随笔分类 - iOS开发
呼呼
    
摘要:一、创建[java]view plaincopyprint?CGRectbounds=[[UIScreenmainScreen]applicationFrame];UIScrollView*scrollView=[[UIScrollViewalloc]initWithFrame:bounds];当你创建完滚动视图后,你可以将另一个视图的内容粘合到滚动视图的空白页上。这回创建一个滚动的内容窗口:[java]view plaincopyprint?[scrollViewaddSubview:myView];你必须给出内容的实际大小,这样滚动视图才知道滚动的范围:[java]view plainco
        阅读全文
                
摘要:1 #import <UIKit/UIKit.h> 2 3 @interface ViewController : UIViewController <UINavigationControllerDelegate,UIImagePickerControllerDelegate>{ 4 UIImageView *backImageView; 5 } 6 7 @property(retain, nonatomic) IBOutlet UIButton *showImgPickerButton; 8 @property(retain, nonatomic) IBOutlet 
        阅读全文
                
摘要:我不知道为什么,不过有人搜索makeKeyAndVisible方法。其实我这种懒人一般不会刨根问底,有些方法照打就好,那些白给的方法有些就别动就好了。我们看看这个每个程序都有的方法吧:[window makeKeyAndVisible];由于iPhone是单窗口程序,所以也就只有这么一个Window对象,而且是UIWindow,不是NSWindow。而根据文档上所说:“这个是便捷方法,去使被使用对象的主窗口显示到屏幕的最前端。你也可以使用hiddenUIView方法隐藏这个窗口”所以基本上来说,对于编程者的区别仅仅在于在其前添加代码,或在其后添加代码
        阅读全文
                
摘要:和SQL Server数据库的查询一样,SQLite数据库也有几个特殊的查询也是比较使用的,比如说:LIKE查询和IN集合查询等,本文介绍了这一部分查询的实例代码,接下来我们就来一一介绍。LIKELIKE 用通配符匹配字符串下划线 _ 匹配一个字符串百分号 % 匹配多个字符串LIKE 匹配字符串时不区分大小写LIKE查询的代码实例如下: 1 sqlite> 2 3 4 5 sqlite> SELECT * FROM Cars WHERE Name Like '____'; 6 7 8 9 Id Name Cost 10 11 12 13 ---- ---------
        阅读全文
                
摘要:""是从程序头文件开始查找,然后在查找系统库:即引入非标准库<>是只查找系统库:即引入标准库
        阅读全文
                
摘要:@synchronized@synchronized(SharedAppDelegate) { [AFHTTPClient setTicket:ticketCookie]; }保证此时没有其他线程对SharedAppDelegate对象进行修改Using the @synchronized DirectiveThe @synchronized directive is a convenient way to create mutex locks on the fly in Objective-C code. The @synchronized directive doe...
        阅读全文
                
摘要:当NSString为纯数字的时候可以用下面的方法://判断是否为整形:- (BOOL)isPureInt:(NSString*)string{ NSScanner* scan = [NSScanner scannerWithString:string]; intval; return[scanscanInt:&val] && [scanisAtEnd];} //判断是否为浮点形:- (BOOL)isPureFloat:(NSString*)string{ NSScanner* scan = [NSScanner scannerWithString:string];...
        阅读全文
                
摘要:AnNSScannerobject scans the characters of anNSStringobject, typically interpreting the characters and converting them into number and string values. You assign the scanner’s string on creation, and the scanner progresses through the characters of that string from beginning to end as you request item
        阅读全文
                
摘要:UILabel: "TheUILabelclass implements a read-only text view."UITextField: "AUITextFieldobject is a control that displays editable text and sends an action message to a target object when the user presses the return button."UITextView: "TheUITextViewclass implements the behavi
        阅读全文
                
 
                    
                     
                    
                 
                    
                
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号