Magic Studio

专心做有逼格的APP!

上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 42 下一页

2013年9月16日 #

Redesign Your App for iOS 7 之 页面布局【转】

摘要: 前言iOS7是目前iOS史上最颠覆的一次改版。它的出现令人兴奋,因为它将会带我们进入一个全新的时代;它的到来也让我们忧心,因为它颠覆了一切,包括我们过去做过的很多努力。但是,相信大家乐意为这个全新时代做更多的努力,因为,它值得期待。最近打算写一系列针对iOS7新特性的文章,今天就从最基本和简单的页面布局开始吧。从头说起当我看见iOS7那个半透明设计的navigationBar,已经有种不详的预感。因为要透过navigationBar看到底下滚动的内容,那么底下的内容必须从顶部开始布局,并且需要设定相应的内边距以让初始内容显示在合适的位置上。要对应用适配这种凶残设计,其工作量绝比适配iPhone 阅读全文

posted @ 2013-09-16 00:12 Mr 布鲁斯 阅读(547) 评论(0) 推荐(0) 编辑

2013年9月14日 #

Creating and Using Static Libraries for iPhone using Xcode 4.3

摘要: Recently, after developing a collection of applications for iPhone that were intended to be used as libraries, I began looking into how to convert Xcode projects into static libraries. Most of what I found was vague, unclear, and outdated. Instructions were either for older versions of Xcode, or ass 阅读全文

posted @ 2013-09-14 12:52 Mr 布鲁斯 阅读(316) 评论(0) 推荐(0) 编辑

Build fat static library (device + simulator) using Xcode and SDK 4+

摘要: 155down votefavorite185It appears that we can - theoretically - build a single static library that includes both simulator and iPhone and iPad.However, Apple has no documentation on this that I can find, and Xcode's default templates are NOT configured to do this.I'm looking for a simple, po 阅读全文

posted @ 2013-09-14 12:50 Mr 布鲁斯 阅读(1229) 评论(0) 推荐(0) 编辑

2013年9月11日 #

How to safely shut down a loading UIWebView in viewWillDisappear?

摘要: up vote24down votefavorite24I have a view containing a UIWebView which is loading a google map (so lots of javascript etc). The problem I have is that if the user hits the 'back' button on the nav bar before the web view has finished loading, it is not clear to me how to tidily tell the web 阅读全文

posted @ 2013-09-11 15:38 Mr 布鲁斯 阅读(1062) 评论(0) 推荐(0) 编辑

2013年9月7日 #

处理iOS设备的屏幕旋转

摘要: 某些情况下,不强制的给用户唯一的屏幕角度给用户。这样用户可以旋转手机得到不同的视觉体验。最简单的就是safari,横看竖看都可以。这时需要捕捉用户的屏幕旋转事件并处理。很简单,才两步。比把大象装冰箱都简单。下面是代码: 1 - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 2 { 3 self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 4 if (self) { 5 [[... 阅读全文

posted @ 2013-09-07 22:28 Mr 布鲁斯 阅读(499) 评论(0) 推荐(0) 编辑

2013年9月6日 #

Instruments Tutorial for iOS: How To Debug Memory Leaks【转】

摘要: If you're new here, you may want to subscribe to myRSS feedor follow me onTwitter. Thanks for visiting!Call the plumber, it's-a-leaking!Update 4/12/13:These days, you should probably be using Apple’s new Automatic Reference Counting (ARC) technology instead of doing manual memory management. 阅读全文

posted @ 2013-09-06 10:36 Mr 布鲁斯 阅读(680) 评论(0) 推荐(0) 编辑

2013年8月23日 #

自定义UINavigationBar的背景【转】

摘要: from:http://cocoa.venj.me/blog/custom-navbar-background/为了让我们的应用程序更加美观,我们往往希望对iPhone自带的控件进行一点自定义。比如,本文即将要讲述的,给UINavigationBar加一个背景。最简单的一个自定义方法就是修改一下背景色。方法非常简单,那就是使用它的tintColor属性:1self.navigationController.navigationBar.tintColor = [UIColor redColor];这样就轻松地为UINavigationBar加上了红色的背景色–当然你可以使用任何颜色。下面是模拟器 阅读全文

posted @ 2013-08-23 16:46 Mr 布鲁斯 阅读(331) 评论(0) 推荐(0) 编辑

2013年8月21日 #

iOS编程——Objective-C KVO/KVC机制[转]

摘要: 这两天在看和这个相关的的内容,全部推翻重写一个版本,这是公司内做技术分享的文档总结,对结构、条理做了更清晰的调整。先找了段代码,理解下,网上看到最多的一段的关于KVC的代码先上代码1.1.Person类2.@implementationPerson3.@synthesizename,age;//属性name将被监视4.-(void)changeName5.{6.name=@"changeNamedirectly";7.}8.@end9.10.11.2.PersonMonitor类监视了name属性12.@implementationPersonMonitor13.14.-( 阅读全文

posted @ 2013-08-21 16:02 Mr 布鲁斯 阅读(334) 评论(0) 推荐(0) 编辑

ios PNG Crush error (PNG图片错误)

摘要: 我是这么解决的:I had the same problem. How to fix : Open up image with Preview -> File > Export > Format change to PNG and you are done其他被采纳的方法:12 Answersactiveoldestvotesup vote41down voteacceptedDid you check whether the fileUsers/kavapanga/Desktop/iPAD/ALN II 3 latest 2/trunk/Resourses/images/C 阅读全文

posted @ 2013-08-21 15:59 Mr 布鲁斯 阅读(1023) 评论(0) 推荐(0) 编辑

2013年8月14日 #

实现自定义延迟加载的滚动视图

摘要: 数据量大,单个数据处理耗时的情况下,一个延迟加载的自定义视图就必不可少了。我们希望这样的视图可以在需要用到某个数据源的时候再去装载这个数据并处理之。而不是视图已启动就把全部的数据都加载上去。如果全部加载再加上服务器请求(如果有的话)的时间绝对超过用户忍耐的极限。随之应用必然遭弃!UITableView也有一定的复用机制。大概的机理是:每次到一个Cell出现在可视区域的时候,它会从已经用过的Cell中取出来一个, 如果还没有用过的Cell(也就是说这个返回值是空)就创建一个。当一个Cell划出可视范围的时候就把这个Cell放到备用数组中供以后使用。如下代码中就有所体现: 1 - (UITable 阅读全文

posted @ 2013-08-14 16:03 Mr 布鲁斯 阅读(731) 评论(0) 推荐(0) 编辑

上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 42 下一页

导航