共 344 篇文章 |
|
【转】IOS数据库操作SQLite3使用详解。5 执行sql文sqlite3_step(stmt);3. 得到数据行中某个列的数据 sqlite3_column_xxx(sqlite3_stmt*, int iCol);在sqlite3_step返回SQLITE_ROW后,使用它得到第iCol列的数据。4. 得到数据行中某个列的数据的类型 int sqlite3_column_type(sqlite3_stmt*, int iCol);返回值:SQLITE_INTEGER,SQLITE_FLOAT,SQ... 阅29 转0 评0 公众公开 15-07-06 15:51 |
* @function dispatch_get_main_queue** @abstract* Returns the default queue that is bound to the main thread.** @discussion* In order to invoke blocks submitted to the main queue, the application must* call dispatch_main(), NSApplicationMain(), or use a CFRunLoop on the main* thread.** @result* Returns the main queue.... 阅57 转0 评0 公众公开 15-05-28 10:51 |
IOS.IOS-如何干掉UITextField的长按手势菜单与输入内容限制。执行UITextField 的delegate 方法 切记 textFiled.delegate = self;- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{UITextField *nameField = (UITextField *)[selfviewWithTag:200];NSString *te... 阅21 转0 评0 公众公开 15-05-25 16:16 |
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{ if (textField == self.titleField) { if (textField.length >20) return NO;- (void)textFieldDidChange:(UITextField *)textField{ if (textField == self.titleField) { if (textField.text.length >... 阅43 转0 评0 公众公开 15-05-22 18:30 |
Core Graphics上下文属性设置当你在图形上下文中绘图时,当前图形上下文的相关属性设置将决定绘图的行为与外观。// sz为[mars size] CGContextScaleCTM(con, 1.0, -1.0); CGContextDrawImage(con, CGRectMake(0, 0, sz.width/2.0, sz.height), marsLeft); CGContextDrawImage(con, CGRectMake(b.size.width-sz.width/2.0, 0, sz.width/2.0, ... 阅60 转0 评0 公众公开 15-05-20 14:40 |
阅63 转0 评0 公众公开 15-05-14 17:59 |
+ (UIImage *) imageFromView: (UIView *)theView { // draw a view''s contents into an image context UIGraphicsBeginImageContext(theView.frame.size);+ (UIImage *) reflectionOfView:(UIView *)theView WithPercent:(CGFloat) percent{ //Retain the width but shrink the height CGSize size = CGSizeMake(theView.frame.size.... 阅2486 转11 评0 公众公开 15-05-14 15:17 |
Xcode封装.Bundle文件。这个时候就需要将一些资源文件封装至.Bundle文件中。3:Bundle文件,用于存放各种资源文件。那么其他的都很简单:这里具体说说bundle文件的封装(其实也很简单)第一步:创建Bundle项目。选择Bundle文件类型后并创建项目。这样就生成了自己的Bundle.NSBundle *buddle = [NSBundlebundleWithPath:@“你的bundle文件存放路... 阅97 转0 评0 公众公开 15-05-13 18:15 |