上一页 1 ··· 4 5 6 7 8 9 下一页
NSIndexPath *indextPath = [NSIndexPathindexPathForRow:sender.tag/100inSection:0];//[NSIndexPath indexPathWithIndex:sender.tag/100 ]; Read More
posted @ 2013-03-18 10:07 leevaboo Views(129) Comments(0) Diggs(0) Edit
要在每一个代码编辑窗口中的边线里显示行号:使用Xcode > Preferences 菜单命令,点击 Text Editing,然后选择show gutter (总是显示边线)以及 Show line numbers (在边线里显示行号)。 Read More
posted @ 2013-03-11 09:57 leevaboo Views(294) Comments(0) Diggs(0) Edit
//Device#define isRetina ([UIScreen mainScreen].scale > 1)//是否iphone5的分辨率#define isIphone5Screen (CGSizeEqualToSize([UIScreen mainScreen].bounds.size, CGSizeMake(320, 568)))#define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, ... Read More
posted @ 2013-03-04 09:28 leevaboo Views(221) Comments(0) Diggs(0) Edit
Key-Value Observing 快速入门苹果开发中文网2010-2-23 21:31:54作者:发芽的石头Key-Value Observing 快速入门翻译:杨登峰 (dengfengyang@gmail.com)时间:2010-03-12转帖请注明转之 苹果开发中文网(http://www.CocoaDev.cn)以上说明是本文不可分割的一部分。假如需要掌握Key-Value Observing机制,那么需要阅读本文应该有帮助。本文提供了Key-Value Observing的一个概述,并且解释为什么需要用它,什么时候用它。在阅读本文之前需要对Key-Value Observing Read More
posted @ 2013-03-01 00:26 leevaboo Views(138) Comments(0) Diggs(0) Edit
1.person类@implementationPerson@synthesizename,age;//属性name将被监视-(void)changeName{name=@"changeNamedirectly";}@end2.PersonMonitor类监视了name属性@implementationPersonMonitor-(void)observeValueForKeyPath:(NSString*)keyPathofObject:(id)objectchange:(NSDictionary*)changecontext:(void*)context{if([key Read More
posted @ 2013-02-28 23:55 leevaboo Views(172) Comments(0) Diggs(0) Edit
如何用Facebook graphic api上传视频:http://developers.facebook.com/blog/post/532/Keychain保存数据封装:https://github.com/carlbrown/PDKeychainBindingsController对焦功能的实现:http://www.clingmarks.com/?p=612自定义圆角Switch按件:https://github.com/domesticcatsoftware/DCRoundSwitch弹出窗口For iphone and ipad:https://github.com/chrism Read More
posted @ 2013-02-26 10:41 leevaboo Views(154) Comments(0) Diggs(0) Edit
-(float) getVolumeLevel{MPVolumeView*slide =[MPVolumeViewnew];UISlider*volumeViewSlider;for(UIView*view in[slide subviews]){if([[[view class] description] isEqualToString:@"MPVolumeSlider"]){ volumeViewSlider =(UISlider*) view;}}float val =[volumeViewSlider value];[slide release];return v. Read More
posted @ 2013-02-23 17:57 leevaboo Views(5907) Comments(0) Diggs(0) Edit
Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'因为UIImagePickerController是竖屏的,而ipad是横屏的,在ios6.0的横竖屏的问题比较敏感,所以在会挂的。解决办法:在supporte Read More
posted @ 2013-02-20 17:25 leevaboo Views(453) Comments(0) Diggs(0) Edit
单例模式的意思就是只有一个实例。单例模式确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例。这个类称为单例类。1.单例模式的要点: 显然单例模式的要点有三个;一是某个类只能有一个实例;二是它必须自行创建这个实例;三是它必须自行向整个系统提供这个实例。2.单例模式的优点: 1.实例控制:Singleton 会阻止其他对象实例化其自己的 Singleton 对象的副本,从而确保所有对象都访问唯一实例。 2.灵活性:因为类控制了实例化过程,所以类可以更加灵活修改实例化过程IOS中的单例模式 在objective-c中要实现一个单例类,至少需要做以下四个步骤: 1、为单例对象实... Read More
posted @ 2013-01-11 16:32 leevaboo Views(144) Comments(0) Diggs(0) Edit
iOS6.0中抛弃了- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation的方法对横竖屏切换的支持,ios6.0中的对横竖切换的支持步骤为第一info.plist中Supported interface orientations中加入支持的方向第二 在AppDelegate中加入 -(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindo... Read More
posted @ 2013-01-09 15:24 leevaboo Views(212) Comments(0) Diggs(0) Edit
上一页 1 ··· 4 5 6 7 8 9 下一页