yptools 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/bin/yptools +4 -0
- data/lib/yptools/help/yp_help.rb +16 -0
- data/lib/yptools/install/mvvm/install-template.sh +15 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/NSObjectObjective-C/___FILEBASENAME___.h +11 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/NSObjectObjective-C/___FILEBASENAME___.m +7 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/NSObjectSwift/___FILEBASENAME___.swift +7 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/TemplateIcon.png +0 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/TemplateIcon@2x.png +0 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/TemplateInfo.plist +224 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionReusableViewObjective-C/___FILEBASENAME___.h +11 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionReusableViewObjective-C/___FILEBASENAME___.m +7 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionReusableViewSwift/___FILEBASENAME___.swift +7 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionReusableViewXIBObjective-C/___FILEBASENAME___.h +11 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionReusableViewXIBObjective-C/___FILEBASENAME___.m +12 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionReusableViewXIBObjective-C/___FILEBASENAME___.xib +17 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionReusableViewXIBSwift/___FILEBASENAME___.swift +12 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionReusableViewXIBSwift/___FILEBASENAME___.xib +17 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionViewCellObjective-C/___FILEBASENAME___.h +11 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionViewCellObjective-C/___FILEBASENAME___.m +7 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionViewCellSwift/___FILEBASENAME___.swift +7 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionViewCellXIBObjective-C/___FILEBASENAME___.h +11 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionViewCellXIBObjective-C/___FILEBASENAME___.m +12 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionViewCellXIBObjective-C/___FILEBASENAME___.xib +21 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionViewCellXIBSwift/___FILEBASENAME___.swift +12 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionViewCellXIBSwift/___FILEBASENAME___.xib +21 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionViewControllerObjective-C/___FILEBASENAME___.h +11 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionViewControllerObjective-C/___FILEBASENAME___.m +87 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionViewControllerSwift/___FILEBASENAME___.swift +83 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionViewControllerXIBObjective-C/___FILEBASENAME___.h +11 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionViewControllerXIBObjective-C/___FILEBASENAME___.m +87 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionViewControllerXIBObjective-C/___FILEBASENAME___.xib +31 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionViewControllerXIBSwift/___FILEBASENAME___.swift +83 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UICollectionViewControllerXIBSwift/___FILEBASENAME___.xib +31 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewCellObjective-C/___FILEBASENAME___.h +11 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewCellObjective-C/___FILEBASENAME___.m +26 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewCellSwift/___FILEBASENAME___.swift +18 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewCellXIBObjective-C/___FILEBASENAME___.h +11 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewCellXIBObjective-C/___FILEBASENAME___.m +18 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewCellXIBObjective-C/___FILEBASENAME___.xib +21 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewCellXIBSwift/___FILEBASENAME___.swift +18 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewCellXIBSwift/___FILEBASENAME___.xib +21 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewControllerObjective-C/___FILEBASENAME___.h +11 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewControllerObjective-C/___FILEBASENAME___.m +87 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewControllerSwift/___FILEBASENAME___.swift +84 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewControllerXIBObjective-C/___FILEBASENAME___.h +11 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewControllerXIBObjective-C/___FILEBASENAME___.m +103 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewControllerXIBObjective-C/___FILEBASENAME___.xib +26 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewControllerXIBSwift/___FILEBASENAME___.swift +84 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewControllerXIBSwift/___FILEBASENAME___.xib +26 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UIViewControllerObjective-C/___FILEBASENAME___.h +11 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UIViewControllerObjective-C/___FILEBASENAME___.m +94 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UIViewControllerObjective-C/___VARIABLE_Proxy___.h +15 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UIViewControllerObjective-C/___VARIABLE_Proxy___.m +39 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UIViewControllerObjective-C/___VARIABLE_TableViewCell___.h +11 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UIViewControllerObjective-C/___VARIABLE_TableViewCell___.m +30 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UIViewControllerObjective-C/___VARIABLE_ViewModel___.h +24 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UIViewControllerObjective-C/___VARIABLE_ViewModel___.m +51 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UIViewControllerSwift/___FILEBASENAME___.swift +24 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UIViewControllerXIBObjective-C/___FILEBASENAME___.h +9 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UIViewControllerXIBObjective-C/___FILEBASENAME___.m +61 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UIViewControllerXIBObjective-C/___FILEBASENAME___.xib +43 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UIViewControllerXIBSwift/___FILEBASENAME___.swift +24 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UIViewControllerXIBSwift/___FILEBASENAME___.xib +22 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UIViewObjective-C/___FILEBASENAME___.h +11 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UIViewObjective-C/___FILEBASENAME___.m +26 -0
- data/lib/yptools/install/mvvm/kMVVM.xctemplate/UIViewSwift/___FILEBASENAME___.swift +15 -0
- data/lib/yptools/install/yp_install.rb +40 -0
- data/lib/yptools/log/yp_log.rb +11 -0
- data/lib/yptools/mgc/yp_makegarbagecode.rb +278 -0
- data/lib/yptools.rb +68 -0
- metadata +156 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
//___FILEHEADER___
|
|
2
|
+
|
|
3
|
+
import UIKit
|
|
4
|
+
|
|
5
|
+
private let reuseIdentifier = "Cell"
|
|
6
|
+
|
|
7
|
+
class ___FILEBASENAMEASIDENTIFIER___: ___VARIABLE_cocoaTouchSubclass___ {
|
|
8
|
+
|
|
9
|
+
override func viewDidLoad() {
|
|
10
|
+
super.viewDidLoad()
|
|
11
|
+
|
|
12
|
+
// Uncomment the following line to preserve selection between presentations
|
|
13
|
+
// self.clearsSelectionOnViewWillAppear = false
|
|
14
|
+
|
|
15
|
+
// Register cell classes
|
|
16
|
+
self.collectionView!.register(UICollectionViewCell.self, forCellWithReuseIdentifier: reuseIdentifier)
|
|
17
|
+
|
|
18
|
+
// Do any additional setup after loading the view.
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/*
|
|
22
|
+
// MARK: - Navigation
|
|
23
|
+
|
|
24
|
+
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
|
25
|
+
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
|
|
26
|
+
// Get the new view controller using [segue destinationViewController].
|
|
27
|
+
// Pass the selected object to the new view controller.
|
|
28
|
+
}
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
// MARK: UICollectionViewDataSource
|
|
32
|
+
|
|
33
|
+
override func numberOfSections(in collectionView: UICollectionView) -> Int {
|
|
34
|
+
// #warning Incomplete implementation, return the number of sections
|
|
35
|
+
return 0
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
|
40
|
+
// #warning Incomplete implementation, return the number of items
|
|
41
|
+
return 0
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
|
45
|
+
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath)
|
|
46
|
+
|
|
47
|
+
// Configure the cell
|
|
48
|
+
|
|
49
|
+
return cell
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// MARK: UICollectionViewDelegate
|
|
53
|
+
|
|
54
|
+
/*
|
|
55
|
+
// Uncomment this method to specify if the specified item should be highlighted during tracking
|
|
56
|
+
override func collectionView(_ collectionView: UICollectionView, shouldHighlightItemAt indexPath: IndexPath) -> Bool {
|
|
57
|
+
return true
|
|
58
|
+
}
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
/*
|
|
62
|
+
// Uncomment this method to specify if the specified item should be selected
|
|
63
|
+
override func collectionView(_ collectionView: UICollectionView, shouldSelectItemAt indexPath: IndexPath) -> Bool {
|
|
64
|
+
return true
|
|
65
|
+
}
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
/*
|
|
69
|
+
// Uncomment these methods to specify if an action menu should be displayed for the specified item, and react to actions performed on the item
|
|
70
|
+
override func collectionView(_ collectionView: UICollectionView, shouldShowMenuForItemAt indexPath: IndexPath) -> Bool {
|
|
71
|
+
return false
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
override func collectionView(_ collectionView: UICollectionView, canPerformAction action: Selector, forItemAt indexPath: IndexPath, withSender sender: Any?) -> Bool {
|
|
75
|
+
return false
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
override func collectionView(_ collectionView: UICollectionView, performAction action: Selector, forItemAt indexPath: IndexPath, withSender sender: Any?) {
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
//___FILEHEADER___
|
|
2
|
+
|
|
3
|
+
#import "___FILEBASENAME___.h"
|
|
4
|
+
|
|
5
|
+
@interface ___FILEBASENAMEASIDENTIFIER___ ()
|
|
6
|
+
|
|
7
|
+
@end
|
|
8
|
+
|
|
9
|
+
@implementation ___FILEBASENAMEASIDENTIFIER___
|
|
10
|
+
|
|
11
|
+
static NSString * const reuseIdentifier = @"Cell";
|
|
12
|
+
|
|
13
|
+
- (void)viewDidLoad {
|
|
14
|
+
[super viewDidLoad];
|
|
15
|
+
|
|
16
|
+
// Uncomment the following line to preserve selection between presentations
|
|
17
|
+
// self.clearsSelectionOnViewWillAppear = NO;
|
|
18
|
+
|
|
19
|
+
// Register cell classes
|
|
20
|
+
[self.collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:reuseIdentifier];
|
|
21
|
+
|
|
22
|
+
// Do any additional setup after loading the view.
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/*
|
|
26
|
+
#pragma mark - Navigation
|
|
27
|
+
|
|
28
|
+
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
|
29
|
+
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
|
30
|
+
// Get the new view controller using [segue destinationViewController].
|
|
31
|
+
// Pass the selected object to the new view controller.
|
|
32
|
+
}
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
#pragma mark <UICollectionViewDataSource>
|
|
36
|
+
|
|
37
|
+
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
|
|
38
|
+
#warning Incomplete implementation, return the number of sections
|
|
39
|
+
return 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
|
44
|
+
#warning Incomplete implementation, return the number of items
|
|
45
|
+
return 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
|
49
|
+
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:reuseIdentifier forIndexPath:indexPath];
|
|
50
|
+
|
|
51
|
+
// Configure the cell
|
|
52
|
+
|
|
53
|
+
return cell;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
#pragma mark <UICollectionViewDelegate>
|
|
57
|
+
|
|
58
|
+
/*
|
|
59
|
+
// Uncomment this method to specify if the specified item should be highlighted during tracking
|
|
60
|
+
- (BOOL)collectionView:(UICollectionView *)collectionView shouldHighlightItemAtIndexPath:(NSIndexPath *)indexPath {
|
|
61
|
+
return YES;
|
|
62
|
+
}
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
/*
|
|
66
|
+
// Uncomment this method to specify if the specified item should be selected
|
|
67
|
+
- (BOOL)collectionView:(UICollectionView *)collectionView shouldSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
|
68
|
+
return YES;
|
|
69
|
+
}
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
/*
|
|
73
|
+
// Uncomment these methods to specify if an action menu should be displayed for the specified item, and react to actions performed on the item
|
|
74
|
+
- (BOOL)collectionView:(UICollectionView *)collectionView shouldShowMenuForItemAtIndexPath:(NSIndexPath *)indexPath {
|
|
75
|
+
return NO;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
- (BOOL)collectionView:(UICollectionView *)collectionView canPerformAction:(SEL)action forItemAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender {
|
|
79
|
+
return NO;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
- (void)collectionView:(UICollectionView *)collectionView performAction:(SEL)action forItemAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender {
|
|
83
|
+
|
|
84
|
+
}
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
@end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
|
3
|
+
<dependencies>
|
|
4
|
+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/>
|
|
5
|
+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
|
6
|
+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
|
7
|
+
</dependencies>
|
|
8
|
+
<objects>
|
|
9
|
+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="___FILEBASENAMEASIDENTIFIER___">
|
|
10
|
+
<connections>
|
|
11
|
+
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
|
12
|
+
</connections>
|
|
13
|
+
</placeholder>
|
|
14
|
+
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
|
15
|
+
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" id="i5M-Pr-FkT">
|
|
16
|
+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
|
17
|
+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
18
|
+
<viewLayoutGuide key="safeArea" id="ij9-ne-Ryy"/>
|
|
19
|
+
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="c7k-ch-oGk">
|
|
20
|
+
<size key="itemSize" width="50" height="50"/>
|
|
21
|
+
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
|
22
|
+
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
|
23
|
+
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
|
24
|
+
</collectionViewFlowLayout>
|
|
25
|
+
<connections>
|
|
26
|
+
<outlet property="dataSource" destination="-1" id="Tng-2m-Rnh"/>
|
|
27
|
+
<outlet property="delegate" destination="-1" id="9aC-8N-iBw"/>
|
|
28
|
+
</connections>
|
|
29
|
+
</collectionView>
|
|
30
|
+
</objects>
|
|
31
|
+
</document>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
//___FILEHEADER___
|
|
2
|
+
|
|
3
|
+
import UIKit
|
|
4
|
+
|
|
5
|
+
private let reuseIdentifier = "Cell"
|
|
6
|
+
|
|
7
|
+
class ___FILEBASENAMEASIDENTIFIER___: ___VARIABLE_cocoaTouchSubclass___ {
|
|
8
|
+
|
|
9
|
+
override func viewDidLoad() {
|
|
10
|
+
super.viewDidLoad()
|
|
11
|
+
|
|
12
|
+
// Uncomment the following line to preserve selection between presentations
|
|
13
|
+
// self.clearsSelectionOnViewWillAppear = false
|
|
14
|
+
|
|
15
|
+
// Register cell classes
|
|
16
|
+
self.collectionView!.register(UICollectionViewCell.self, forCellWithReuseIdentifier: reuseIdentifier)
|
|
17
|
+
|
|
18
|
+
// Do any additional setup after loading the view.
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/*
|
|
22
|
+
// MARK: - Navigation
|
|
23
|
+
|
|
24
|
+
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
|
25
|
+
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
|
|
26
|
+
// Get the new view controller using [segue destinationViewController].
|
|
27
|
+
// Pass the selected object to the new view controller.
|
|
28
|
+
}
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
// MARK: UICollectionViewDataSource
|
|
32
|
+
|
|
33
|
+
override func numberOfSections(in collectionView: UICollectionView) -> Int {
|
|
34
|
+
// #warning Incomplete implementation, return the number of sections
|
|
35
|
+
return 0
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
|
40
|
+
// #warning Incomplete implementation, return the number of items
|
|
41
|
+
return 0
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
|
45
|
+
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath)
|
|
46
|
+
|
|
47
|
+
// Configure the cell
|
|
48
|
+
|
|
49
|
+
return cell
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// MARK: UICollectionViewDelegate
|
|
53
|
+
|
|
54
|
+
/*
|
|
55
|
+
// Uncomment this method to specify if the specified item should be highlighted during tracking
|
|
56
|
+
override func collectionView(_ collectionView: UICollectionView, shouldHighlightItemAt indexPath: IndexPath) -> Bool {
|
|
57
|
+
return true
|
|
58
|
+
}
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
/*
|
|
62
|
+
// Uncomment this method to specify if the specified item should be selected
|
|
63
|
+
override func collectionView(_ collectionView: UICollectionView, shouldSelectItemAt indexPath: IndexPath) -> Bool {
|
|
64
|
+
return true
|
|
65
|
+
}
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
/*
|
|
69
|
+
// Uncomment these methods to specify if an action menu should be displayed for the specified item, and react to actions performed on the item
|
|
70
|
+
override func collectionView(_ collectionView: UICollectionView, shouldShowMenuForItemAt indexPath: IndexPath) -> Bool {
|
|
71
|
+
return false
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
override func collectionView(_ collectionView: UICollectionView, canPerformAction action: Selector, forItemAt indexPath: IndexPath, withSender sender: Any?) -> Bool {
|
|
75
|
+
return false
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
override func collectionView(_ collectionView: UICollectionView, performAction action: Selector, forItemAt indexPath: IndexPath, withSender sender: Any?) {
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
|
3
|
+
<dependencies>
|
|
4
|
+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/>
|
|
5
|
+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
|
6
|
+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
|
7
|
+
</dependencies>
|
|
8
|
+
<objects>
|
|
9
|
+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="___FILEBASENAMEASIDENTIFIER___" customModuleProvider="target">
|
|
10
|
+
<connections>
|
|
11
|
+
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
|
12
|
+
</connections>
|
|
13
|
+
</placeholder>
|
|
14
|
+
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
|
15
|
+
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" id="i5M-Pr-FkT">
|
|
16
|
+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
|
17
|
+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
18
|
+
<viewLayoutGuide key="safeArea" id="oBF-5E-Iza"/>
|
|
19
|
+
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="c7k-ch-oGk">
|
|
20
|
+
<size key="itemSize" width="50" height="50"/>
|
|
21
|
+
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
|
22
|
+
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
|
23
|
+
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
|
24
|
+
</collectionViewFlowLayout>
|
|
25
|
+
<connections>
|
|
26
|
+
<outlet property="dataSource" destination="-1" id="Tng-2m-Rnh"/>
|
|
27
|
+
<outlet property="delegate" destination="-1" id="9aC-8N-iBw"/>
|
|
28
|
+
</connections>
|
|
29
|
+
</collectionView>
|
|
30
|
+
</objects>
|
|
31
|
+
</document>
|
data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewCellObjective-C/___FILEBASENAME___.m
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//___FILEHEADER___
|
|
2
|
+
|
|
3
|
+
#import "___FILEBASENAME___.h"
|
|
4
|
+
|
|
5
|
+
@interface ___FILEBASENAMEASIDENTIFIER___ ()
|
|
6
|
+
|
|
7
|
+
@end
|
|
8
|
+
|
|
9
|
+
@implementation ___FILEBASENAMEASIDENTIFIER___
|
|
10
|
+
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
|
|
11
|
+
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
|
12
|
+
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
|
13
|
+
[self setupSubViews];
|
|
14
|
+
}
|
|
15
|
+
return self;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
- (void)setupSubViews{
|
|
19
|
+
//to do
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
- (void)layoutSubviews{
|
|
23
|
+
[super layoutSubviews];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//___FILEHEADER___
|
|
2
|
+
|
|
3
|
+
import UIKit
|
|
4
|
+
|
|
5
|
+
class ___FILEBASENAMEASIDENTIFIER___: ___VARIABLE_cocoaTouchSubclass___ {
|
|
6
|
+
|
|
7
|
+
override func awakeFromNib() {
|
|
8
|
+
super.awakeFromNib()
|
|
9
|
+
// Initialization code
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
override func setSelected(_ selected: Bool, animated: Bool) {
|
|
13
|
+
super.setSelected(selected, animated: animated)
|
|
14
|
+
|
|
15
|
+
// Configure the view for the selected state
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
}
|
data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewCellXIBObjective-C/___FILEBASENAME___.m
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//___FILEHEADER___
|
|
2
|
+
|
|
3
|
+
#import "___FILEBASENAME___.h"
|
|
4
|
+
|
|
5
|
+
@implementation ___FILEBASENAMEASIDENTIFIER___
|
|
6
|
+
|
|
7
|
+
- (void)awakeFromNib {
|
|
8
|
+
[super awakeFromNib];
|
|
9
|
+
// Initialization code
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
|
13
|
+
[super setSelected:selected animated:animated];
|
|
14
|
+
|
|
15
|
+
// Configure the view for the selected state
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@end
|
data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewCellXIBObjective-C/___FILEBASENAME___.xib
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
|
3
|
+
<dependencies>
|
|
4
|
+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/>
|
|
5
|
+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
|
6
|
+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
|
7
|
+
</dependencies>
|
|
8
|
+
<objects>
|
|
9
|
+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
|
10
|
+
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
|
11
|
+
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="___FILEBASENAMEASIDENTIFIER___">
|
|
12
|
+
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
|
13
|
+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
|
14
|
+
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
|
15
|
+
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
|
|
16
|
+
<autoresizingMask key="autoresizingMask"/>
|
|
17
|
+
</tableViewCellContentView>
|
|
18
|
+
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
|
19
|
+
</tableViewCell>
|
|
20
|
+
</objects>
|
|
21
|
+
</document>
|
data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewCellXIBSwift/___FILEBASENAME___.swift
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//___FILEHEADER___
|
|
2
|
+
|
|
3
|
+
import UIKit
|
|
4
|
+
|
|
5
|
+
class ___FILEBASENAMEASIDENTIFIER___: ___VARIABLE_cocoaTouchSubclass___ {
|
|
6
|
+
|
|
7
|
+
override func awakeFromNib() {
|
|
8
|
+
super.awakeFromNib()
|
|
9
|
+
// Initialization code
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
override func setSelected(_ selected: Bool, animated: Bool) {
|
|
13
|
+
super.setSelected(selected, animated: animated)
|
|
14
|
+
|
|
15
|
+
// Configure the view for the selected state
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
|
3
|
+
<dependencies>
|
|
4
|
+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/>
|
|
5
|
+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
|
6
|
+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
|
7
|
+
</dependencies>
|
|
8
|
+
<objects>
|
|
9
|
+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
|
10
|
+
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
|
11
|
+
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="___FILEBASENAMEASIDENTIFIER___" customModuleProvider="target">
|
|
12
|
+
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
|
13
|
+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
|
14
|
+
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
|
15
|
+
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
|
|
16
|
+
<autoresizingMask key="autoresizingMask"/>
|
|
17
|
+
</tableViewCellContentView>
|
|
18
|
+
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
|
|
19
|
+
</tableViewCell>
|
|
20
|
+
</objects>
|
|
21
|
+
</document>
|
data/lib/yptools/install/mvvm/kMVVM.xctemplate/UITableViewControllerObjective-C/___FILEBASENAME___.m
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
//___FILEHEADER___
|
|
2
|
+
|
|
3
|
+
#import "___FILEBASENAME___.h"
|
|
4
|
+
|
|
5
|
+
@interface ___FILEBASENAMEASIDENTIFIER___ ()
|
|
6
|
+
|
|
7
|
+
@end
|
|
8
|
+
|
|
9
|
+
@implementation ___FILEBASENAMEASIDENTIFIER___
|
|
10
|
+
|
|
11
|
+
- (void)viewDidLoad {
|
|
12
|
+
[super viewDidLoad];
|
|
13
|
+
|
|
14
|
+
// Uncomment the following line to preserve selection between presentations.
|
|
15
|
+
// self.clearsSelectionOnViewWillAppear = NO;
|
|
16
|
+
|
|
17
|
+
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
|
|
18
|
+
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
#pragma mark - Table view data source
|
|
22
|
+
|
|
23
|
+
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
|
24
|
+
#warning Incomplete implementation, return the number of sections
|
|
25
|
+
return 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
|
29
|
+
#warning Incomplete implementation, return the number of rows
|
|
30
|
+
return 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/*
|
|
34
|
+
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
|
35
|
+
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:<#@"reuseIdentifier"#> forIndexPath:indexPath];
|
|
36
|
+
|
|
37
|
+
// Configure the cell...
|
|
38
|
+
|
|
39
|
+
return cell;
|
|
40
|
+
}
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
/*
|
|
44
|
+
// Override to support conditional editing of the table view.
|
|
45
|
+
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
|
|
46
|
+
// Return NO if you do not want the specified item to be editable.
|
|
47
|
+
return YES;
|
|
48
|
+
}
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
/*
|
|
52
|
+
// Override to support editing the table view.
|
|
53
|
+
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
|
|
54
|
+
if (editingStyle == UITableViewCellEditingStyleDelete) {
|
|
55
|
+
// Delete the row from the data source
|
|
56
|
+
[tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
|
|
57
|
+
} else if (editingStyle == UITableViewCellEditingStyleInsert) {
|
|
58
|
+
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
/*
|
|
64
|
+
// Override to support rearranging the table view.
|
|
65
|
+
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
|
|
66
|
+
}
|
|
67
|
+
*/
|
|
68
|
+
|
|
69
|
+
/*
|
|
70
|
+
// Override to support conditional rearranging of the table view.
|
|
71
|
+
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
|
|
72
|
+
// Return NO if you do not want the item to be re-orderable.
|
|
73
|
+
return YES;
|
|
74
|
+
}
|
|
75
|
+
*/
|
|
76
|
+
|
|
77
|
+
/*
|
|
78
|
+
#pragma mark - Navigation
|
|
79
|
+
|
|
80
|
+
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
|
81
|
+
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
|
82
|
+
// Get the new view controller using [segue destinationViewController].
|
|
83
|
+
// Pass the selected object to the new view controller.
|
|
84
|
+
}
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
@end
|