自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 Masonry从0到使用

以前一直是用代码适配,这次想尝试一下使用Masonry。从头开始。1、pod 'Masonry' 先用 pod 配置三方库,but第一次没成功。2、#define MAS_SHORTHAND 添加这句代码到你的pch文件中,这样你就不再需要mas_这些讨人厌的前缀啦。

2016-12-16 23:14:49 521

原创 pch文件

配置:1、在工程中新建一个PCH 文件:New File ->Other ->PCH File(这就是需要新建的pch文件,点击改好名字和路径) ->Create。这时候就创建好了一个pch文件2、把pch 是我路径改为相对路径这样把工程在其他设备上也能查找到相应的pch 文件    (1、Build Setting 设置中找到Precomplie Prefix Heade

2016-12-16 21:37:42 653

原创 状态栏的edgesForExtendLayout属性

edgesForExtendLayout是iOS7之后一个类型为UIExtendedEdge的属性,指定边缘要延伸的方向,它的默认值是UIRectEdgeAll,四周边缘均延伸,就是说,如果即使视图中上有navigationBar,下有tabBar,那么视图仍会延伸覆盖到四周的区域。self.edgesForExtendedLayout = UIRectEdgeNone;上面的代码用来解决

2016-12-15 15:55:11 595

原创 项目里面访问AppDelegate做全局变量的方式

.h文件中+ (AppDelegate *)sharedAppDelegate;.m文件中+ (AppDelegate *)sharedAppDelegate {    return (AppDelegate *)[UIApplicationsharedApplication].delegate;}引用时[AppDelegatesha

2016-12-15 15:35:10 809

原创 NSIndexPath的初始化方法

NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0];

2016-09-13 15:23:50 4812

原创 按钮中图片和文字的左右位置

文字在右,图片在左button.imageEdgeInsets =UIEdgeInsetsMake(0,0, 0, labelWidth);button.titleEdgeInsets =UIEdgeInsetsMake(0,0, 0,0);文字在左,图片在右button.imageEdgeInsets = UIEdg

2016-08-24 10:59:22 2932

原创 字符

一个汉字等于两个字符

2016-07-18 13:50:09 391

原创 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 922

原创 主页添加网络状态

- (void)viewDidLoad {   //openfire 连接状态通知    [[NSNotificationCenterdefaultCenter] addObserver:selfselector:@selector(openFireConnectState)name:BXOpenFireStateDidChangeNotificationobj

2016-06-23 13:30:10 296

原创 项目中某个页面强制横屏

需求:项目中某个页面强制横屏,其他页面仍为竖屏解决:    在viewDidLoad中调用下面的方法- (void)hengping{        [[BXNavigationItemHelpersetupReturnButtonWithController:self]handleControlEvent:UIControlEventTouchUpInsidewi

2016-05-23 10:59:50 1223

原创 miss @end

错误:miss @end解决:这个错误并不在报错的地方,是其他地方多了什么,或者少了什么

2016-04-28 10:09:50 792

原创 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 297

原创 WebViewJavascriptBridge报错

错误:WebViewJavascriptBridge版本问题(见附件图片)解决:更新WebViewJavascriptBridge库,暂时是更新为pod'WebViewJavascriptBridge','~> 4.1.4'           重新pod install --verbose --no-repo-update,再运行即可

2016-04-22 10:15:52 4869

原创 在pod中引入XMPPFramework时报错

错误:在pod中引入XMPPFramework时报错(报12个错误,错误在DDXMLNode.h里面)解决:DDXMLNode.h里面,用    #import     #import     @class DDXMLDocument;         替换即可

2016-04-22 10:06:41 1193

原创 不能选择设备(真机,模拟器都不可以)

错误:不能选择设备(真机,模拟器都不可以)解决:TARGETS选中General --> Deployment Info --> Deployment Target 版本调低(比真机或者模拟器低)

2016-04-15 13:14:30 703

原创 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 2096

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除