// same with each other
NS_AVAILABLE_IOS(10.0)
__IOS_AVAILABLE(10.0)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# 必须用 zsh,否则后面的数组操作可能失败 | |
# 需要编译的 scheme,可以改为你自己的,或者给脚本传递 -s 参数 | |
scheme="T4" | |
configuration=Release | |
usesFramework=1 # 是否以 framework 为容器。framework 装的也可能是静态库 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// see my comments |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
copy these files from Xcode 9 to Xcode 10 like this: | |
1. copy stdc++*.tbd to | |
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/ | |
2. copy stdc++*.dylib to | |
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in header file | |
extern struct LALIMtopAPI { | |
__unsafe_unretained NSString *logout; | |
__unsafe_unretained NSString *login; | |
} const kLALIMtopAPI; | |
// implementation file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
一、命名问题: | |
1. 想缩短类名或方法名时 | |
2. 希望使用嵌套类 | |
二、类型 | |
1. 希望使用语法检查更严的泛型时 | |
2. 想使用 String 枚举作为常量时 | |
三、其他 | |
1. 不希望在头文件和代码文件反复切换时 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Header File | |
NS_ASSUME_NONNULL_BEGIN | |
// No asterisk after DataType | |
@interface BaseCell<DataType> : UICollectionViewCell | |
- (DataType)data; | |
- (void)bindData:(DataType)data; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation MyClass { | |
// It is an ivar, or called member variable | |
// Can NOT be initialized when defined. | |
// Can be accessed with `self->_i` | |
int _i; | |
} | |
int i = 9; // Global variable, and can be initialized when defined. | |
@end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Masonry/Masonry.h> | |
@implementation ViewController { | |
UIView * _v; | |
UILabel * _label; | |
bool _constraintsAdded; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if #available(iOS 10.3, *) { | |
//SKStoreReviewController.requestReview() | |
//app.openURL(URL(string: "itms-apps://itunes.apple.com/app/id1018728680?action=write-review")!) // app前的cn段也不是必须啊 | |
} else { | |
// Fallback on earlier versions | |
} |
NewerOlder