随笔分类 - IPhone
About Document Interaction
摘要:About Document InteractioniOS provides technologies for displaying previews of files that your app doesn’t directly support. iOS also provides a systemwide registry of file type associations, allowing your app to handle the opening of files from other installed apps. These powerful technologies incl
阅读全文
利用Segue在视图控制器间传值的问题
摘要:-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{1 if([[segue identifier] isEqualToString:@"groupPopoverSegue"])2 {3 UIViewController *vc = segue.destinationViewController; //popover 视图控制器时,ios5视图控制器会马上执行viewdidload,ios6中当你显示执行第5行语句时也会执行viewdidload。非popover会等prepareFor..
阅读全文
UITableViewCell 为什么有时会自动添加一个空的UILabel?
摘要:self.contentView 里有时会出这样的子视图。。。。<UILabel: 0x81667f0; frame = (0 0; 0 0); clipsToBounds = YES; userInteractionEnabled = NO; layer = <CALayer: 0x8166880>>
阅读全文
Objective-c 字符串比较的陷井
摘要:(lldb) po [success compare:@"yes"] $1 = 0 <nil> (lldb) p [success compare:@"yes"] (int) $2 = 0 (lldb) p [success isEqualToString:@"yes"] 安全写法 (char) $
阅读全文
UITableView Add
摘要:1 2 /* 3 File: TagSelectionController.m 4 Abstract: The table view controller responsible for displaying all available tags. 5 The controller is also given an Event object. Row for tags related to the event display a checkmark. If the user taps a row, the corresponding tag is added t...
阅读全文
AX ERROR: Could not find my mock parent, most likely I am stale
摘要:AX ERROR: Could not find my mock parent, most likely I am stale使用设计好的cell做为表头视图,控制出现的log,挺有意思。 1 - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section 2 { 3 4 IoriTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"DataDetailHeadCell"]; 5
阅读全文
what is the SEL,id and IMP,Class ,Method?
摘要:1 /* Basic data types for Objective C. 2 Copyright (C) 1993, 1995, 1996, 2004 Free Software Foundation, Inc. 3 4 This file is part of GCC. 5 6 GCC is free software; you can redistrib...
阅读全文
NSArray enumeration performance examined
摘要:public class UDIParser { /// <summary> /// 数据库UDI解析规则数据映射:iKeyID, cDateFormat, cKeyValue, iPos_From, iPos_To, /// </summary> public static System.Coll
阅读全文
Creating a Singleton Instance(各语言单例模式)
摘要:双检锁技术 C# public sealed class Singleton { private static Singleton _instance; private static readonly object LockObject = new object(); // 私有构造函数,防止外部实
阅读全文
iOS面试小题集锦
摘要:1、Object-C有多继承吗?没有的话用什么代替? cocoa 中所有的类都是NSObject 的子类 多继承在这里是用protocol 委托代理 来实现的你不用去考虑繁琐的多继承 ,虚基类的概念.ood的多态特性 在 obj-c 中通过委托来实现. 2、Object-C有私有方法吗?私有变量呢?
阅读全文
如何弹出UIDatePicker最好
摘要:UIDateicker并没有继承UIPickerView,它的宽度只有iphone的宽度,在ipad上直接显示出来非常不协调,所以苹果建议用UIPopoverViewController来显示,所以你可以在里面任意定制。 在iphone中显示需要手动配制动画,因为它只是一个视图。所以你有下面几种方式
阅读全文
被忽略的iOS开发中的小细节
摘要:辅助功能网页元素的提示信息,例如: alt title
阅读全文
How Can i Transfer Xcode 4 Code Snippets from One Machine to Another?
摘要:Ah found it, they are saved at:~/Library/Developer/Xcode/UserData/CodeSnippets/Each one is a plist file. In contrast to Xcode 3 there is now one file per snippet.
阅读全文
Why RootViewController's view is rotated Automatically by System when the app first loaded?
摘要:Your app has aUIWindow, which contains your root view controller's view, which contains the button:UIWindowyour root viewUIButtonWhat you didn't understand is that theUIWindowrotates the user interface by applying a rotation transform to your root. Take a look at the view hierarchy when the
阅读全文
What is the dSYM?
摘要:When you run the Build and Archive command, Xcode 3.2.2 or later fetches your application binary and its associated .dSYM file and saves them in your
阅读全文
Xcode Plugin: Change Code In Running App Without Restart
摘要:Using Injection it is possible to make a change to the implementation of an Objective-C® class and have it take effect as soon as the class is saved without having to restart the application. This feature works for OS X and iOS applications in the simulator and on iOS devices.
阅读全文
(转) 内存区划分、内存分配、常量存储区、堆、栈、自由存储区、全局区
摘要:一. 在c中分为这几个存储区1.栈 - 由编译器自动分配释放2.堆 - 一般由程序员分配释放,若程序员不释放,程序结束时可能由OS回收3.全局区(静态区),全局变量和静态变量的存储是放在一块的,初始化的全局变量和静态变量在一块区域,未初始化的全局变量和未初始化的静态变量在相邻的另一块区域。- 程序结束释放4.另外还有一个专门放常量的地方。- 程序结束释放在函数体中定义的变量通常是在栈上,用malloc, calloc, realloc等分配内存的函数分配得到的就是在堆上。在所有函数体外定义的是全局量,加了static修饰符后不管在哪里都存放在全局区(静态区),在所有函数体外定义的static变
阅读全文
create similar newsRead template view by myself
摘要:前年做新闻类客户端时,想实现自定义几个模板的视图轮留切换显示,在当时也不知道能不能实现,所以先用javascript写了一段模拟真实,看上去还不错,之后就将它翻成objective-c了,项目完成。 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2 <HTML> 3 <HEAD> 4 <TITLE> New Document </TITLE> 5 <META NAME="Generator" CONTENT
阅读全文