随笔 - 934, 文章 - 0, 评论 - 247, 阅读 - 344万

导航

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

05 2012 档案

摘要:在storyboard中,segue有几种不同的类型,在iphone和ipad的开发中,segue的类型是不同的。在iphone中,segue有:push,modal,和custom三种不同的类型,这些类型的区别在与新页面出现的方式。而在ipad中,有push,modal,popover,replace和custom五种不同的类型。modal模态转换最常用的场景,新的场景完全盖住了旧的那个。用户无法再与上一个场景交互,除非他们先关闭这个场景。是在viewController中的标准切换的方式,包括淡出什么的,可以选切换动画。Modalview:就是会弹出一个view,你只能在该view上操作, 阅读全文

posted @ 2012-05-30 16:59 蝈蝈俊 阅读(8179) 评论(0) 推荐(0) 编辑

摘要:UIViewController initWithNibName这时候是延迟加载主要代码如下: ShowViewController * showMessage = [[ShowViewController alloc] initWithNibName:@"ShowViewController" bundle:nil]; self.sh... 阅读全文

posted @ 2012-05-28 18:33 蝈蝈俊 阅读(4984) 评论(0) 推荐(1) 编辑

摘要:iOS app life cycle 生命周期图 第一步: Main 有C相关语言开发经验的朋友都知道,所有程序运行都是从 main 程序开始的。 #import <UIKit/UIKit.h>#import "NoteNavAppDelegate.h"int main(int argc, char *argv[]){ @autoreleasepool { r... 阅读全文

posted @ 2012-05-25 16:40 蝈蝈俊 阅读(736) 评论(0) 推荐(0) 编辑

摘要:XCode 4 以后,项目模版中没有了 Window-based Application,跟它比较接近的项目模版是 Empty Application. 如下图的选择: 我们想建一个 Window-based Application,需要在 Empty Application 基础上做一些设置。 下面是操作步骤, 新建一个 Empty Application 默认的 Empty A... 阅读全文

posted @ 2012-05-25 15:38 蝈蝈俊 阅读(9560) 评论(5) 推荐(1) 编辑

摘要:NULL Values These macros define null values for classes and instances. NULL可以用在C语言的各种指针上 #define __DARWIN_NULL #define __DARWIN_NULLConstants c 特有的,例子: int *pointerToInt = NULL; char... 阅读全文

posted @ 2012-05-24 15:06 蝈蝈俊 阅读(1316) 评论(0) 推荐(0) 编辑

摘要:loaded the "*****" nib but the view outlet was not set 错误的解决办法。在Xcode下不用Storyboard做一些试验时,总是提示:loaded the "*****" nib but the view outlet was not set网上搜索了一下,发现是nib文件没有跟xxxViewControler关联导致的.1, 打开nib文件2... 阅读全文

posted @ 2012-05-23 09:02 蝈蝈俊 阅读(5509) 评论(0) 推荐(0) 编辑

摘要:IBOutlet和IBAction 是为了你在interface building 设计交互界面的时候告诉它这些是你要用到的,其他的没标明的都是不需要直接和界面交互的。 简单理解: 假设有两个黑盒子: 盒子A里放着代码 ,盒子B里放着盒子A要用到的ui组件 要想让A里的代码访问到B里的组件,比如想要修改label的文字 ,那些就要从A处打个洞连到B处,这时就用IBOu... 阅读全文

posted @ 2012-05-22 14:08 蝈蝈俊 阅读(918) 评论(1) 推荐(0) 编辑

摘要:在addObj后及时释放所添加的object NSMutableArray *array = [NSMutableArray new]; NSString *str = [[NSString alloc] initWithFormat:@"a"]; [array addObject:str]; [str release]; [array release]; 也就是说当你吧str放进array的时... 阅读全文

posted @ 2012-05-22 11:43 蝈蝈俊 阅读(275) 评论(0) 推荐(0) 编辑

摘要:为每一个变量实现其访问器,繁琐,@property 可以替我们减轻工作。 是否暴露读写接口 readonly 将只生成getter方法而不生成setter方法(getter方法没有get前缀)。 readwrite 默认属性,将生成不带额外参数的getter和setter方法(set... 阅读全文

posted @ 2012-05-22 10:12 蝈蝈俊 阅读(537) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示