- 博客(22)
- 收藏
- 关注
原创 UITableViewRowAction 自定义 标题颜色 背景色 图片
先说下大体思路,先先创建 label 设置 字体和颜色(也可以 是imageview ) 。然后利用UIGraphics 绘制成图片,然后利用+ (UIColor *)colorWithPatternImage:(UIImage *)image; 这个 方法把图片转换成颜色, 最后设置UITableViewRowAction 背景色 就完成了UIImage *(^GetImageWithView)(UIView *) = ^(UIView *view) { UIGraphicsBeginI...
2020-08-10 19:01:02
1194
原创 Xcode info.plist 国际化 多语言配置
针对APP 名称和权限请求提示做的多语言处理步骤如下:新建 InfoPlist.strings 文件,选中新建文件点击右方location如下图编号13.点击 info.plist 文件右键点击Raw keys & values
2020-06-29 11:53:14
6691
1
原创 masory 刷新约束方法 释义
setNeedsLayout:告知页面需要更新,但是不会立刻开始更新。执行后会立刻调用layoutSubviews。 layoutIfNeeded:告知页面布局立刻更新。所以一般都会和setNeedsLayout一起使用。如果希望立刻生成新的frame需要调用此方法,利用这点一般布局动画可以在更新布局后直接使用这个方法让动画生效。 layoutSubviews:系统重写布局 setNeedsUpdateConstraints:告知需要更新约束,但是不会立刻开始 updateConstraintsIf
2020-06-09 10:29:22
509
原创 UItableView 使用 headerview MJRefresh 出现刷新偏移问题
解决方法如下: if (@available(iOS 11.0, *)) { self.homeTabelView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; } else { self.automaticallyAdjustsScrollView...
2019-04-28 18:55:23
2974
原创 关于UITableView 刷新 页面偏移滑动或闪动问题
原因 iOS 11后系统默认开启Self-Sizing解决:设置列表的预设 行高 头 尾预设高度 self.tableView.estimatedRowHeight = 0; self.tableView.estimatedSectionHeaderHeight = 0; self.tableView.estimatedSectionFooterHeight =...
2019-04-08 10:54:07
1412
原创 iOS 可- (UIInterfaceOrientationMask )application:(UIApplication *)application supportedInterfa选择性禁止横屏
代码全部禁止横屏 AppDelegate内- (UIInterfaceOrientationMask )application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{ return UIInterfaceOrientationMaskPort...
2019-03-29 12:06:28
3231
原创 iOS屏幕自动旋转 以及横屏模式打开APP出现的问题
首先 项目配置 设置支持方向创建UINavigationController父类、 tabbar 父类 、 uiviewcontroller 父类UINavigationController.m中实现- (BOOL)shouldAutorotate { if([self.topViewController respondsToSelector:@selecto...
2019-03-28 15:39:35
2412
原创 ios 时长转成时分秒格式
//传入 秒 得到 xx:xx:xx-(NSString *)getMMSSFromSS:(NSString *)totalTime{ NSInteger seconds = [totalTime integerValue]; //format of hour NSString *str_hour = [NSString stringWithFor...
2019-02-22 15:54:17
1811
原创 UIGestureRecognizer 和点击事件冲突问题
最近做项目时候, 遇到 UIGestureRecognizer 与手势或 tableView(列表) 点击事件冲突问题解决
2019-01-16 11:31:15
1258
原创 关于ios NSNotificationCenter 可以多次添加(addObserver) 同一个通知的 问题
偶然的一次, 开发中, 给同一个通知 注册了多次, 发现这个通知多次调用响应的方法, 才发现, 同一个对象是可以多次注册同一个通知的。这点以后需要注意, 1.写在ViewController中的注册通知,在页面pop后会自动在通知中心移除自己;写在其他对象中的注册通知,释放后不会自动移除自己,这时候会引起崩溃。另外 有说通知发送和 接受都是在同一线程内的,这个我不赞同! 2.发...
2019-01-10 18:30:44
4535
原创 关于PHAsset调用 requestImageForAsset方法 返回nil的问题
NSDictionary *dict = notification.userInfo; NSMutableArray *assetsArray = [dict objectForKey:@"assetsArray"]; __weak typeof(self) weakSelf = self; PHImageRequestOptions *options = ...
2019-01-10 18:07:06
7141
1
原创 UITextView uiviewcontrollerhierarchyinconsistency child view controller should 报错
报错如下:Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:<UICompatibilityInputViewController: 0x1199008b0> should have parent vie...
2018-11-08 17:49:20
2015
原创 关于使用 cocoaPods 添加成功后,导入不了头文件或者not found file 报错
关于用cocoapods添加第三方库,并且cocoapods添加成功,但是却在任何一个文件上都导入不了头文件,而且根本没有提示,即使手动打#import "xxxx.h"也报错xxxx.h not found file , 那么 我们就在 TARGETS --> Build Settings —> User Header Search Paths 中 添加${SRCROOT} 就可以...
2018-04-08 14:18:57
5698
原创 关于 cocoaPods "Remove the build settings from the target"或target overrides the `OTHER_LDFLAGS` 报错解决
最近mac 整体环境升级了下:pod版本1.4.0 , ruby也升级到2.5.1 , brew 版本1.5.14, gem版本2.7.6;然后在使用cocoapods就出了各种错误,先是出现 Podfilew文件问题报错,如下:cannot load such file -- cfpropertylist终端显示: ### Command```/Users/songyaqing/.rvm/ru...
2018-04-04 10:23:20
1840
原创 App Store商店图片文案填写说明
1. APP名称2.隐私政策网址,指的是《服务协议》 可以是一个静态页3.类别(APP分类以便于App Store 分类查找)4.屏幕快照和预览jpg 或png格式对照尺寸如下:5.描述 APP说明介绍6.关键词检索7.技术支持网址(可以填写公司官网网址)8.AppStore 图标(尺寸1024x1024) 9.版权归属(可填公司名)10.商务代表信息这个是指 与AppStore官方审核团队...
2018-03-26 15:48:49
3125
原创 ios开发Xcode报错: Compiling IB documents for earlier than iOS 7 is no longer supported.
在我们升级到Xcode9时,最低的编译版本为iOS8,但是在使用一些SDK的时候就会报出Compiling IB documents for earlier than iOS7 is no longer supported. 解决如下, 点击报错文件把interface builder document 下的builds for改为deployment target(7.0)就可以了;如下图:...
2018-03-26 15:05:57
878
原创 hashids 加密 id
首先导入 pod 导入vim 输入: pod search Hashids podfile 文件 写入 pod 'Hashids', '~> 0.3.2'pod install 下 导入完成使用 加密———————————————— NSString *user_id NSString *SECRET_KEY =
2017-06-27 09:49:48
1132
原创 notification 推送警告- 通知集成遇到的问题
You've implemented -[ application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.pl
2017-05-03 11:08:57
426
转载 Git的使用
GIT 的常规操作常规操作也是我自己平时常用的几个命令, 学自于 pro git 这本书中git 配置文件git的配置文件位置针对所有用户:/etc/gitconfig针对当前用户: ~/.gitconfig查看配置的方法git config --list修改配置的方法git config --global user.name "wang
2017-04-24 16:00:58
209
转载 Git仓库完整迁移 含历史记录
Git仓库完整迁移 含历史记录 标签: git2015-05-22 18:12 2903人阅读 评论(0) 收藏 举报 分类:Svn Git 版本控制如果你想从别的 Git 托管服务那里复制一份源代码到新的 Git 托管服务器上的话,可以通过以下步骤来操作。1). 从原地址克隆一份裸版本库,比如原本托管于 GitHub
2017-04-24 11:33:48
2278
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人