摘要: 今天在项目的StoryBoard中,拖入一个UIView,并且连线到代码中,起名parabolaSliderView.我想让这个view做动画效果,所以需要重设一下frame。可是在重设parabolaSliderView的frame时,发现代码中设置的位置不起作用,不管代码中怎么设置fram... 阅读全文
posted @ 2014-04-23 14:50 瓜甜甜 阅读(1233) 评论(0) 推荐(0) 编辑
摘要: CGFloat statusBarHeight = [[UIApplicationsharedApplication] statusBarFrame].size.height; 阅读全文
posted @ 2014-03-31 09:38 瓜甜甜 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 默讣情冴下,Xcode 创建一个标准的规图控刢器。我们将使用导航控刢器 (Navigation Controller)控刢画面的导航。1、在StoryBoard中,选择Editor/Embled in菜单,选择Navigation Controller,这时候,就会自动在导航控制器中嵌入一个视图控制器,我们叫这个试图控制器微BookViewController,这时候运行结果只有一个导航条。 表明已成功嵌入BookViewController到导航控制器中。2、添加表视图,用于展示书本名字。从对象库中选择TableView,放到BookViewController中(编辑器是最小状态时,不能. 阅读全文
posted @ 2014-03-19 14:42 瓜甜甜 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 1、获得屏幕图像- (UIImage *)imageFromView: (UIView *) theView{ UIGraphicsBeginImageContext(theView.frame.size); CGContextRef context = UIGraphicsGetCurrentContext(); [theView.layer renderInContext:context]; UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); ... 阅读全文
posted @ 2013-11-22 11:10 瓜甜甜 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 测试项目时,在ios5.1.1以下的设备上总是出现错误,错误信息如下:[UIPageControl setCurrentPageIndicatorTintColor:]: unrecognized selector sent to instance而ios6.0以上的设备就没问题。经过查资料,才知道原来UIpageControl的currentPageIndicatorTintColor属性是在ios6.0以上的才有的。查看苹果api文档,可知,currentPageIndicatorTintColor--》Available in iOS 6.0 and later. 在ios6.0以下如. 阅读全文
posted @ 2013-11-13 16:09 瓜甜甜 阅读(538) 评论(0) 推荐(0) 编辑
摘要: 问题:在代码中将button加到ImageView上,给该button添加了点击事件,但是点击button没响应解决方法:后来试过才发现,此时将该button的父view(也就是ImageView)的 userInteractionEnabled属性设为YES,此时button就能正常响应点击事件 阅读全文
posted @ 2013-11-07 10:53 瓜甜甜 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 1、今天在实现推送时,将最后合成的pem证书给后台测试后,一直连接不上苹果服务器,之前测试的其他项目推送好好的,怎么这个项目不行呢?后来,想起来,在将p12文件生成pem文件时输入过一次密码,之后又有一次“Enter PEM pass phrase:这也需要输入密码,而后台服务器要的密码就是“Enter PEM pass phrase:这次输入的密码””如下图所示:给后台的密码即是绿框中圈出来的密码2、在应用上线后,把发布证书合成的pem文件给后台替换了,但测试推送收不到推送消息,后来在网上查资料,得知测试接口是sandbox:gateway.sandbox.push.apple.com:21 阅读全文
posted @ 2013-11-05 16:06 瓜甜甜 阅读(510) 评论(0) 推荐(0) 编辑
摘要: 1、 用钥匙串新建一个证书,在建推送证书的时候选择该证书2、 新建AppId,注意的是得使Push notification设置为endabled。点击“Genetrate”这时会下载一个aps_development.cer,点击安装,打开钥匙串,将推送证书和秘钥导出p12文件3、 新建配置文件PushProfile,在此选择新建的AppId,然后点击“setting”,下载一个证书,点击download,并安装。4、 在终端将这两个p12文件转换为pem文件,然后把这两个pem文件合并为一个pem文件,合并后的pem文件在此例中为ck.pem,将ck.pem和deviceToken发送给服 阅读全文
posted @ 2013-10-23 10:04 瓜甜甜 阅读(442) 评论(0) 推荐(0) 编辑
摘要: 刚开始在使用SVPRogressHUD时,遇到一个问题:当有网络数据加载时,使用如下代码:[SVProgressHUD showWithStatus:@"加载中请稍后" maskType:SVProgressHUDMaskTypeNone];这样,在加载过程中其后的视图仍然可以点击,比如:正在加载,还可以点击返回。分享等按钮,后来查资料,才知,是参数的问题,后修改为:[SVProgressHUD showWithStatus:@"加载中请稍后" maskType:SVProgressHUDMaskTypeBlack];这样,问题解决了。SVProgre 阅读全文
posted @ 2013-09-24 17:30 瓜甜甜 阅读(2560) 评论(0) 推荐(0) 编辑
摘要: 在导入flurry统计库时,运行有如下错误:Undefined symbols for architecture i386: "_SecItemAdd", referenced from: -[FlurryKeychainWrapper setData:forKey:] in libFlurry.a(libFlurry.a-i386-master.o) "_SecItemCopyMatching", referenced from: -[FlurryKeychainWrapper dataForKey:] in libFlurry.a(libFlurry 阅读全文
posted @ 2013-09-22 14:34 瓜甜甜 阅读(244) 评论(0) 推荐(0) 编辑