
iOS
文章平均质量分 56
u013349304
这个作者很懒,什么都没留下…
展开
-
could not find developer disk image
错误:could not find developer disk image解决:手机系统版本过高 1)升级Xcode 2)拷贝本文附件到“/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport”文件夹中原创 2016-04-28 09:31:35 · 330 阅读 · 0 评论 -
项目里面访问AppDelegate做全局变量的方式
.h文件中+ (AppDelegate *)sharedAppDelegate;.m文件中+ (AppDelegate *)sharedAppDelegate { return (AppDelegate *)[UIApplicationsharedApplication].delegate;}引用时[AppDelegatesha原创 2016-12-15 15:35:10 · 869 阅读 · 0 评论 -
Masonry从0到使用
以前一直是用代码适配,这次想尝试一下使用Masonry。从头开始。1、pod 'Masonry' 先用 pod 配置三方库,but第一次没成功。2、#define MAS_SHORTHAND 添加这句代码到你的pch文件中,这样你就不再需要mas_这些讨人厌的前缀啦。原创 2016-12-16 23:14:49 · 553 阅读 · 0 评论 -
按钮中图片和文字的左右位置
文字在右,图片在左button.imageEdgeInsets =UIEdgeInsetsMake(0,0, 0, labelWidth);button.titleEdgeInsets =UIEdgeInsetsMake(0,0, 0,0);文字在左,图片在右button.imageEdgeInsets = UIEdg原创 2016-08-24 10:59:22 · 2999 阅读 · 0 评论 -
NSIndexPath的初始化方法
NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0];原创 2016-09-13 15:23:50 · 4899 阅读 · 0 评论 -
UITableView默认选中第一个cell
NSInteger selectedIndex = 0;NSIndexPath *selectedIndexPath = [NSIndexPath indexPathForRow:selectedIndex inSection:0]; [self.tableView selectRowAtIndexPath:selectedIndexPath animated:NO scrollP原创 2016-06-23 14:21:56 · 979 阅读 · 0 评论 -
主页添加网络状态
- (void)viewDidLoad { //openfire 连接状态通知 [[NSNotificationCenterdefaultCenter] addObserver:selfselector:@selector(openFireConnectState)name:BXOpenFireStateDidChangeNotificationobj原创 2016-06-23 13:30:10 · 330 阅读 · 0 评论 -
字符
一个汉字等于两个字符原创 2016-07-18 13:50:09 · 422 阅读 · 0 评论 -
项目中某个页面强制横屏
需求:项目中某个页面强制横屏,其他页面仍为竖屏解决: 在viewDidLoad中调用下面的方法- (void)hengping{ [[BXNavigationItemHelpersetupReturnButtonWithController:self]handleControlEvent:UIControlEventTouchUpInsidewi原创 2016-05-23 10:59:50 · 1282 阅读 · 0 评论 -
WebViewJavascriptBridge报错
错误:WebViewJavascriptBridge版本问题(见附件图片)解决:更新WebViewJavascriptBridge库,暂时是更新为pod'WebViewJavascriptBridge','~> 4.1.4' 重新pod install --verbose --no-repo-update,再运行即可原创 2016-04-22 10:15:52 · 5016 阅读 · 0 评论 -
在pod中引入XMPPFramework时报错
错误:在pod中引入XMPPFramework时报错(报12个错误,错误在DDXMLNode.h里面)解决:DDXMLNode.h里面,用 #import #import @class DDXMLDocument; 替换即可原创 2016-04-22 10:06:41 · 1243 阅读 · 0 评论 -
不能选择设备(真机,模拟器都不可以)
错误:不能选择设备(真机,模拟器都不可以)解决:TARGETS选中General --> Deployment Info --> Deployment Target 版本调低(比真机或者模拟器低)原创 2016-04-15 13:14:30 · 788 阅读 · 0 评论 -
Your build settings specify a provisioning profile with the UUID
我的第一篇博客,啾啾啾错误:“Your build settings specify a provisioning profile with the UUID “”, however, no such provisioning profile was found”。解决方法: 1.找到项目中的**.xcodeproj文件,点击右键,show package contents原创 2016-04-15 11:04:25 · 2159 阅读 · 0 评论 -
miss @end
错误:miss @end解决:这个错误并不在报错的地方,是其他地方多了什么,或者少了什么原创 2016-04-28 10:09:50 · 844 阅读 · 0 评论 -
状态栏的edgesForExtendLayout属性
edgesForExtendLayout是iOS7之后一个类型为UIExtendedEdge的属性,指定边缘要延伸的方向,它的默认值是UIRectEdgeAll,四周边缘均延伸,就是说,如果即使视图中上有navigationBar,下有tabBar,那么视图仍会延伸覆盖到四周的区域。self.edgesForExtendedLayout = UIRectEdgeNone;上面的代码用来解决原创 2016-12-15 15:55:11 · 648 阅读 · 0 评论