随笔分类 -  IOS

1
Ios Develop. IOS Application&IOS Games&Mobile Ecommerce
摘要:1、登陆苹果开发中心,进入MemberCenter,选择点击2、进入之后选择点击Certificates:3、选择Devices下得All4、选择添加新设备,将设备的标识输入进去5、添加成功之后,点击左边的:6、选择一个item,点编辑,将Devices全部选中:7、将生成的证书,下载8、删除旧的证书:打开Xcode,点击Window—organizer9、双击安装刚才下载的新证书10、点击Xcode菜单栏:Product—>Archive如果有错误出现,在Build Setting中的Code Signing Identity,将Release的identitys in Keychai 阅读全文
posted @ 2013-11-05 18:43 cateatmycode 阅读(193) 评论(0) 推荐(0)
摘要:iPhone开发一些读书笔记手机应用分类1.教育工具2.生活工具3.社交应用4.定位工具5.游戏6.报纸和杂志的阅读器7.移动办公应用8.财经工具9.手机购物应用10.风景区相关应用11.旅游相关的应用12.导航工具13.企业应用Delegation模式——delegation(委托)模式就是使用回调机制NSData、NSMutableData——存放二进制数据的数据类型对于画图,你首先需要重载drawRect方法。UIKit提供了如下方法:UIRectFill(CGRect rect);//填充整个框UIRectFrame(CGRect rect);//指定框的颜色UINavigationC 阅读全文
posted @ 2013-09-18 17:29 cateatmycode 阅读(1661) 评论(0) 推荐(0)
摘要:第十八章:Image和鼠标事件1.NSResponderNSView继承自NSResponder类。所有的事件处理方法都定义在NSResponder类中。NSResponder申明了如下方法:- (void)mouseDown:(NSEvent *)theEvent;- (void)rightMouseDown:(NSEvent *)theEvent;- (void)otherMouseDown:(NSEvent *)theEvent;- (void)mouseUp:(NSEvent *)theEvent;- (void)rightMouseUp:(NSEvent *)theEvent;- ( 阅读全文
posted @ 2013-09-05 18:21 cateatmycode 阅读(1754) 评论(0) 推荐(0)
摘要:第一章:什么是Cocoa1.1 历史简介1.2 开发工具:Xcode、Interface Builder(一个GUI构建工具)。在它们内部,使用gcc为编译器来编译代码,并使用gdb来查找错误1.3 语言Objective-C的代码由gcc编译-GUN C编译器。该编译器允许自由的在同一文件中混合C、C++及Ojbective-C代码GUN调试器——gdb,用来设置断点,运行时查看程序中变量的值1.4 对象、类、方法和消息对象就像C语言中的结构:它占用内存空间来保存自己的变量。这些变量被称为“成员变量”。所以在处理对象时,首先想到的一个问题是:怎样给一个对象分配空间?这个对象拥有哪些成员变量? 阅读全文
posted @ 2013-09-05 15:18 cateatmycode 阅读(2359) 评论(0) 推荐(0)
摘要:本文来自stackoverflow一位网友的解答,感觉非常不错就摘录了。---------------------------------------------------------------------------I don't think there is a rule written down anywhere, but hopefully this will help:First, let's clear up some definitions. I think offscreen vs onscreen rendering is not a good way t 阅读全文
posted @ 2013-08-29 17:32 cateatmycode 阅读(501) 评论(0) 推荐(0)
摘要:0CGContextRef context = UIGraphicsGetCurrentContext();设置上下文1 CGContextMoveToPoint开始画线2 CGContextAddLineToPoint画直线4 CGContextAddEllipseInRect画一椭圆4 CGContextSetLineCap设置线条终点形状4 CGContextSetLineDash画虚线4 CGContextAddRect画一方框4 CGContextStrokeRect指定矩形4 CGContextStrokeRectWithWidth指定矩形线宽度4 CGContextStrokeL 阅读全文
posted @ 2013-08-19 17:49 cateatmycode 阅读(373) 评论(0) 推荐(0)
摘要:1、三角函数 double sin (double);正弦 double cos (double);余弦 double tan (double);正切 2 、反三角函数 double asin (double); 结果介于[-PI/2, PI/2] double acos (double); 结果介于[0, PI] double atan (double); 反正切(主值), 结果介于[-PI/2, PI/2] double atan2 (double, double); 反正切(整圆值), 结果介于[-PI, PI] 3 、双曲三角函数 double sinh (doub... 阅读全文
posted @ 2013-07-25 12:00 cateatmycode 阅读(810) 评论(0) 推荐(0)
摘要:因为svn是个开发工具 所以苹果把他移到Xcode developer package里去了,所以你没装xcode之类的,先去AppStore把xcode装了装好之后sudo vi /etc/paths在最下面加上一行 /Applications/Xcode.app/Contents/Developer/usr/bin按Ese进入vi编辑模式,输入:wq!保存 退出。重启终端 阅读全文
posted @ 2013-06-27 10:36 cateatmycode 阅读(1499) 评论(0) 推荐(0)
摘要:上周面试的一家深圳公司,真是奇葩,名字我就不说了。 号称脱胎于中科院下某孵化项目,作为创业公司,你窝在一80平米的两隔间里,我可以理解。 你个“创业老总”劈头盖脸就给人一“测试真诚度”的表格给人填写,包括什么:有没有女朋友,没有,为什么?有,为什么?分手了,为什么? 大学有没有重修的课程?(请真实填 阅读全文
posted @ 2013-06-04 11:27 cateatmycode 阅读(4292) 评论(48) 推荐(8)
摘要:在项目target的summary标签页下找到App Icons项,在“Prerendered”打上钩此时在info.plist里会多出一个配置项"Icon already includes gloss effects"再找到“Icon files (iOS 5)”项目(如果有的话),展开,把里面的“Icon already includes gloss effects”也设置成“YES”:这样程序中的高光效果就取消了。itunes connect上的图标我们在itunes connect网站上创建应用时也要求上传图标,上传后itunes connect也会给图标加上高光效 阅读全文
posted @ 2013-06-02 17:14 cateatmycode 阅读(255) 评论(0) 推荐(0)
摘要:周四去面试了XX公司iOS程序员,费了半天劲才找到地方,居然在一个破宾馆里面,一间小房子,3对办公桌拼起来的办公室,一看到此情此景,我心顿时都凉了半截。房子里面热得要命,我坐那才一会,后背都湿了。管事的拿了份面试题给我做,我做的时候感觉挺简单,不过后来查资料,好像有些地方还是不太对。题目如下:1:Object-c有多重继承吗?没有的话有什么替代?我的回答:没有。用protocol代替网上答案:cocoa中的所有类都是NSObject的子类。多继承在这里是用protocol委托代理来实现的2:static作用?我的答案:静态声明。声明一个变量或方法为静态。静态变量在类的第一次实例化时,即分配存储 阅读全文
posted @ 2013-05-26 23:58 cateatmycode 阅读(735) 评论(4) 推荐(0)
摘要:It is a simple way to test that a methods parameter is not nil or not 0. So basically, you use it to create a precondition, stating that some parameter must be set. If it is not set, the macro causes the application to abort and generates an error on that line. So:- (void)someMethod:(id)someObjectTh 阅读全文
posted @ 2013-05-08 22:46 cateatmycode 阅读(429) 评论(0) 推荐(0)
摘要:contentSize是scrollview可以滚动的区域,比如frame = (0 ,0 ,320 ,480) contentSize = (320 ,960),代表你的scrollview可以上下滚动,滚动区域为frame大小的两倍。contentOffset是scrollview当前显示区域顶点相对于frame顶点的偏移量,比如上个例子你拉到最下面,contentoffset就是(0 ,480),也就是y偏移了480contentInset是scrollview的contentview的顶点相对于scrollview的位置,例如你的contentInset = (0 ,100),那么你的 阅读全文
posted @ 2013-04-28 23:27 cateatmycode 阅读(188) 评论(0) 推荐(0)
摘要:UIViewContentModeScaleToFillUIViewContentModeScaleAspectFitUIViewContentModeScaleAspectFillUIViewContentModeRedrawUIViewContentModeCenterUIViewContentModeTopUIViewContentModeBottomUIViewContentModeLeftUIViewContentModeRightUIViewContentModeTopLeftUIViewContentModeTopRightUIViewContentModeBottomLeftU 阅读全文
posted @ 2013-04-24 18:58 cateatmycode 阅读(511) 评论(0) 推荐(0)
摘要:创建UITableViewController子类的实例后,IDE生成的代码中有如下段落:- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = [NSString stringWithFormat:@"Cell"]; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: 阅读全文
posted @ 2013-03-25 23:57 cateatmycode 阅读(464) 评论(0) 推荐(0)
摘要:在写 JavaScript 的时候,可以使用一个叫做 window 的对象,像是我们想要从现在的网页跳到另外一个网页的时候,就会去修改 window.location.href 的位置;在我们的 Objective C 程序码中,如果我们可以取得指定的 WebView 的指标,也就可以拿到这个出现在 JavaScript 中的 window 对象,也就是 [webView windowScriptObject]。这个对象就是 WebView 里头的 JS 与我们的 Obj C 程序之间的桥樑-window 对象可以取得网页里头所有的 JS 函数与对象,而如果我们把一个 Obj C 对象设定成 阅读全文
posted @ 2013-03-25 19:18 cateatmycode 阅读(501) 评论(0) 推荐(0)
摘要:AFNetwork是一个轻量级的网络请求api类库。是以NSURLConnection, NSOperation和其他方法为基础的。下面这个例子是用来处理json请求的:NSURL *url = [NSURL URLWithString:@"https://alpha-api.app.net/stream/0/posts/stream/global"];NSURLRequest *request = [NSURLRequest requestWithURL:url];AFJSONRequestOperation *operation = [AFJSONRequestOper 阅读全文
posted @ 2013-03-22 16:50 cateatmycode 阅读(998) 评论(0) 推荐(0)
摘要:1:在github上下载https://github.com/yjxsf8313/asi-http-request2:引入1)在项目下新建一个Group,命名为ASIHttp,鼠标右击,选中“Add files to ....”,将下载的ASIHttprequest库中的class文件夹都引用进来,并将Externl文件夹中的Reachability添加到class下。留下ASIWebPageRequest这个文件夹,其他的都删掉2)添加ASIHttprequest的依赖Frameworks:SystemConfiguration.framework, MobileCoreServices.f 阅读全文
posted @ 2013-03-22 15:09 cateatmycode 阅读(376) 评论(0) 推荐(0)
摘要:libz.dylibA file ending in the extension.dylibis a dynamic library: it's a library that's loaded at runtime instead of at compile time. If you're familiar with DLLs from Windows or DSOs, it's more or less the same type of thing with a few twists. TheDynamic Library Programming Topics 阅读全文
posted @ 2013-03-21 20:27 cateatmycode 阅读(316) 评论(0) 推荐(0)
摘要:Which to use?-Usually depends on the contextIf you are using a view, typically you use frameIf you are implementing a view,typically you use boundsMatter of perspective-From outside it's usually the frame-From inside it's usually the boundsExamples:-Creating a view,positioning a view in supe 阅读全文
posted @ 2013-02-20 01:21 cateatmycode 阅读(231) 评论(0) 推荐(0)

1