iOS
马不停蹄地忧伤
爬行者
展开
-
常用pod命令
在podfile中指定仓库地址比如source 'https://github.com/CocoaPods/Specs.git'比如source 'https://gitee.com/mirrors/CocoaPods-Specs.git':git指定自定义 git 库 pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git' , :tag => '0.7.0':path指定本地库 po原创 2021-11-01 12:04:23 · 2619 阅读 · 0 评论 -
tabbar只显示图片和自定义图片高度
只显示图片/** // UIEdgeInsetsMake top 以底部为基准,数值越大,越压缩 // UIEdgeInsetsMake bottom 以顶部为基准 数值越大,越压缩 // 若需要往上移动 (top为负数,bottom未正,取值一样)(-value,0,value,0) // 若需要往下移动 (top为正数,bottom未负,取值一样)(value,0,-value,0) */ ViewControllerSecond *原创 2021-10-11 17:15:13 · 195 阅读 · 0 评论 -
新建.gitignore文件 指定部分文件不上传远程git
新建.gitignore在.git文件的同级目录下新建 .gitignore文件文件内容怎么编辑(https://github.com/github/gitignore)比如xcode -oc# Created by https://www.gitignore.io/api/xcode### Xcode #### Xcode## gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C原创 2020-12-02 16:28:51 · 230 阅读 · 0 评论 -
iOS14,UIDatePicker高度变小无法滚动
先设置style,再设置frameif (@available(iOS 13.4, *)) { _datePicker.preferredDatePickerStyle = UIDatePickerStyleWheels;} else { // Fallback on earlier versions}_datePicker.frame = CGRectMake(...);原创 2020-11-16 16:34:35 · 289 阅读 · 0 评论 -
xcode 安装 oneDart theme
![在这里插入图片描述](https://img-blog.csdnimg.cn/20200901121627170.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3UwMTMxNjM4MzQ=,size_16,color_FFFFFF,t_70#pic_center原创 2020-09-01 12:17:35 · 226 阅读 · 0 评论 -
iOS Framework制作
置为NO 表示支持所有设备 置为NO 表示编译选项优化合并真机模拟器版本sudo lipo -create 真机framework路径 模拟器framework路径 -output 合成后framework的路径查看是否包含两种架构lipo -info framework路径 ...原创 2020-05-11 11:43:55 · 419 阅读 · 0 评论 -
WKWebView Completion handler passed to -[WebViewVC webView:runJavaScriptAlertPanelWithMessage:initi
WKWebView 获取js弹框报错Completion handler passed to -[WebViewVC webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:] was not called原因For user security, your app should call...原创 2019-12-18 17:16:53 · 6245 阅读 · 0 评论 -
swift中 if let 的简单理解
if letclass OptionalTest: NSObject { func test1(){ let str:String? = "take me to your heart" let str2:String = str! // 强制解析时必须有值(如果可选值没有值时,强制解包会出现编译进行时异常crash) //...原创 2019-12-13 16:34:59 · 1302 阅读 · 0 评论 -
动态更换App icon图标
更改ios app 图标//动态更换图标 if ([UIApplication sharedApplication].supportsAlternateIcons) { [[UIApplication sharedApplication] setAlternateIconName:@"newImage" completionHandler:^(NSError * _Nul...原创 2019-12-11 14:23:00 · 897 阅读 · 0 评论 -
APP后台杀掉后,点击推送通知跳转至指定界面
杀掉后的推送必走方法- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions // NSDictionary *remoteNotification 做成全局 self.remoteNotification = [launchOpti...原创 2019-11-06 17:06:22 · 863 阅读 · 0 评论 -
Injection简单使用
1.配置// 1.在Appdelegate 设置路径 // OC版NSBundle *resourceBundle = [NSBundle bundleWithPath:@"/Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle"]; [resourceBundle load];2.在需要的UI...原创 2018-11-04 16:01:56 · 2815 阅读 · 0 评论 -
__attribute__的简简简单理解
attribute的简简简单理解1.attribute是编译指令. 帮助编译器优化或者为代码的使用者显示有用的警告信息 2.attribute 命令提供代码运行需要的上下文。 3.给代码定义(变量,参数,函数,方法,类等等)提供额外的上下文信息都应该使用 attribute. 4.声明一个API在某平台的可用性:attribute((availability(…))):如 NS_AVAILA原创 2017-02-22 16:19:17 · 307 阅读 · 0 评论 -
iOS expected a type
基本都是语义上的错误 (持续补充中......)eg.1.你的结构体定义的不对会出现2.在nsobject 类实现 UIKit --> import UIKit 即可3.CGRect 写成NSRect......4.原创 2016-08-12 10:53:14 · 3503 阅读 · 0 评论 -
动画资源
动画资源https://github.com/YouXianMing/Animations原创 2016-08-10 09:29:58 · 262 阅读 · 0 评论 -
文章标题
NSTime 写在-(void)dealloc不被释放-(void)createTime{ self.timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(onTimerCount) userInfo:nil repeats:YES]; [[NSRunLoop curre原创 2016-07-30 16:57:05 · 198 阅读 · 0 评论