随笔分类 -  [iphone 开发学习]

摘要:It seems to be possible in iOS 5 using the UIAppearance proxy.[[UILabel appearance] setFont:[UIFont fontWithName:@"YourFontName" size:17.0]];That will set the font to be whatever your custom font is for all UILabels in your app. You'll need to repeat it for each control (UIButton, UILa 阅读全文
posted @ 2013-11-01 14:47 Clin 阅读(462) 评论(0) 推荐(0)
摘要:NSString+TimeCategory.h//------------------------------------------------#import @interface NSString (TimeCategory) + (NSString *)stringWithTime:(NSTimeInterval)time;- (NSTimeInterval)timeValue; @end//------------------------------------------------//NSString+TimeCategory.m//----------------------.. 阅读全文
posted @ 2013-10-30 09:21 Clin 阅读(282) 评论(0) 推荐(0)
摘要:// Scale up on button press- (void) buttonPress:(UIButton*)button { button.transform = CGAffineTransformMakeScale(1.1, 1.1); // Do something else}// Scale down on button release- (void) buttonRelease:(UIButton*)button { button.transform = CGAffineTransformMakeScale(1.0, 1.0); // Do somet... 阅读全文
posted @ 2013-10-28 10:31 Clin 阅读(272) 评论(0) 推荐(0)
摘要:記錄一下在Objective-C由NSString轉換為NSDate或NSDate轉換為NSString的方法。很簡單,使用NSDateFormatter就可以令NSString和NSDate互相轉換。由NSDate轉換為NSString:NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];[dateFormatter setTimeZone:[NSTimeZonetimeZoneWithName:@"GMT"]]; //设置时区[dateFormatter setDateFormat:@" 阅读全文
posted @ 2013-10-27 16:52 Clin 阅读(232) 评论(0) 推荐(0)
摘要:[转]http://blog.csdn.net/ysy441088327/article/details/7432151摘要:记录一些网上非常牛的人写的博文.收藏起来. 以备日后需要时学习备用.1:iOS中UIWebView的Javascript与Objective-C通信http://imchao.net/2012/03/18/uiwebview-javascript-communicate-with-cocoa-in-ios/2:UIView 你知道多少?http://www.cnblogs.com/likwo/archive/2011/06/18/2084192.html3:UIWebV 阅读全文
posted @ 2013-10-24 16:32 Clin 阅读(258) 评论(0) 推荐(0)
摘要:1.安装http://stackoverflow.com/questions/16459028/rvm-install-error-running-requirements-osx-port-install-porthttp://www.inferjay.com/blog/2013/05/09/how-to-install-ruby-1-dot-9-3-in-mac-osx/http://www.cnblogs.com/superhappy/archive/2013/04/23/3038493.htmlhttp://www.cnblogs.com/dyingbleed/archive/2013 阅读全文
posted @ 2013-10-24 09:48 Clin 阅读(227) 评论(0) 推荐(0)
摘要:[转自]http://idevchina.com/t/20code4app.com 这网站不错,收集各种 iOS App 开发可以用到的代码示例cocoacontrols.com/ 英文版本的lib收集objclibs.com/ 精品lib的收集网站http://www.ityran.com/forum-61-1.html 泰然代码仓库---------------------- emoji ----------------------http://www.easyapns.com/category/just-for-funhttp://www.emoji-cheat-sheet.com/-- 阅读全文
posted @ 2013-10-23 22:43 Clin 阅读(11578) 评论(0) 推荐(2)
摘要:Q:I want to add some views to UIButton, for example multiple UILabels, UIImages etc. One I add those view they do not get the touch events. How can I pass the touch events to UIButton?Thanks--------A:Set the userInteractionEnabled property of each of the subviews you added to your UIButton to NO. 阅读全文
posted @ 2013-10-23 17:31 Clin 阅读(169) 评论(0) 推荐(0)
摘要:When thesearchBar:textDidChange:method of the UISearchBarDelegate gets called because of the user tapping the 'clear' button, the searchBar hasn't become the first responder yet, so we can take advantage of that in order to detect when the user in fact intended to clear the search and no 阅读全文
posted @ 2013-10-23 10:54 Clin 阅读(1795) 评论(0) 推荐(0)
摘要:http://stackoverflow.com/questions/808503/uibutton-making-the-hit-area-larger-than-the-default-hit-area 阅读全文
posted @ 2013-09-23 16:00 Clin 阅读(193) 评论(0) 推荐(1)
摘要://添加监听事件[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];//监听回调#pra 阅读全文
posted @ 2013-07-18 21:32 Clin 阅读(531) 评论(0) 推荐(0)
摘要:1.uiimage图片拉伸- (void)stretchBackgroundImage{ //UIImage *originalImage = [[self backgroundImageForState:UIControlStateNormal] copy]; UIImage *ori... 阅读全文
posted @ 2013-07-05 14:37 Clin 阅读(580) 评论(1) 推荐(0)
摘要:扫描wifi信息:http://code.google.com/p/uwecaugmentedrealityproject/http://code.google.com/p/iphone-wireless/条形码扫描:http://zbar.sourceforge.net/iphone/sdkdoc/install.htmltcp/ip的通讯协议:http://code.google.com/p/cocoaasyncsocket/voip/sip:http://code.google.com/p/siphon/http://code.google.com/p/asterisk-voicemai 阅读全文
posted @ 2011-12-11 13:59 Clin 阅读(246) 评论(0) 推荐(1)
摘要:转自http://blog.sina.com.cn/s/blog_63f5d1a70100uo9p.html在Objective-c 2 .0中引入了 property 和 synthesize 为方便存取1 让大家认识一下 property and synthesize 吧@property预编译命令的作用是自动声明属性的setter和getter方法@synthesize也是一种新的编译器功能,表示“创建该属性的访问器”废话少说~~下面更精彩哦~~~下面我们来对比一下有这两个属性和不用这两个属性的区别吧!!!----------------------------------没用之前--- 阅读全文
posted @ 2011-11-21 10:14 Clin 阅读(154) 评论(0) 推荐(0)
摘要:XCode4.2中使用Empty Application模板替代旧的Window Based Application老外的方法:In the tutorial that I am learning at the moment, it requires “Window-based application”.Xcode 4.2 beta 4 does not have “window-based application”; so, I created a project with “Empty application”.Unfortunately, “Empty application” has 阅读全文
posted @ 2011-11-11 20:05 Clin 阅读(337) 评论(0) 推荐(0)