随笔分类 -  ios

上一页 1 ··· 7 8 9 10 11 12 下一页

ios 更改UITableview中Section的字体颜色
摘要:-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ UILabel *customLabel = [[UILabel alloc] init]; customLabel.text = [self tableView:tableView titleForHeaderInSection:section]; return customLabel;} 阅读全文

posted @ 2013-10-25 11:53 Hai_阔天空 阅读(418) 评论(0) 推荐(0)

ios 开发环境,证书和授权文件
摘要:一、成员介绍1.Certification(证书)证书是对电脑开发资格的认证,每个开发者帐号有一套,分为两种:1)Developer Certification(开发证书)安装在电脑上提供权限:开发人员通过设备进行真机测试。可以生成副本供多台电脑安装;2) Distribution Certification(发布证书)安装在电脑上提供发布iOS程序的权限:开发人员可以制做测试版和发布版的程序。不可生成副本,仅有配置该证书的电脑才可使用;(副本制做介绍在下面Keychain中介绍)2.Provisioning Profile(授权文件)授权文件是对设备如iPod Touch、iPad、iPho 阅读全文

posted @ 2013-10-25 10:19 Hai_阔天空 阅读(507) 评论(0) 推荐(0)

如何使用iOS 开发证书 和 Profile 文件
摘要:如果你想在 iOS 设备(iPhone/iPad/iTouch)上调试, 需要有 iOS 开发证书和 Profile 文件。 在你拿到这两个文件之后,该如何使用呢?证书使用说明: 1. iOS 开发证书:开发证书 (Development Certificate)是一个后缀为 .p12的文件(Certificates.p12);在Mac 系统下, 双击这个文件,这个证书会自动导入到 Mac 下的 key chain (钥匙链)目录下。2. iOS 发布证书:发布证书 (Distribution Certificate)是一个后缀为 .p12 的文件(Certificates.p12); 在Ma 阅读全文

posted @ 2013-10-24 15:51 Hai_阔天空 阅读(5779) 评论(1) 推荐(0)

ios 自定义UITableView中分组的标题sectionview
摘要://Section的标题栏高度-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ if (section == 0) return 46; else return 30.0f;} -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ CGRect headerFrame = CGRectMake(0... 阅读全文

posted @ 2013-10-14 13:52 Hai_阔天空 阅读(1245) 评论(0) 推荐(0)

ios UITableView多选删除
摘要:第一步,- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath { return UITableViewCellEditingStyleDelete | UITableViewCellEditingStyleInsert;} UITableViewCellEditingStyleDelete是出现红的减号,再点一下就出来划动时出现的删除钮;UITableViewCellEditingStyleI... 阅读全文

posted @ 2013-09-29 16:17 Hai_阔天空 阅读(572) 评论(0) 推荐(0)

ios 给UIImageView添加阴影
摘要:_borderView.layer.shadowColor = [UIColor grayColor].CGColor;_borderView.layer.shadowOffset = CGSizeZero; _borderView.layer.shadowOpacity = 1.0;_borderView.layer.shadowRadius = 2;_borderView.backgroundColor = [UIColor whiteColor];_borderView.clipsToBounds = NO; 阅读全文

posted @ 2013-09-26 14:37 Hai_阔天空 阅读(909) 评论(0) 推荐(0)

ios sqlite的创建数据库,表,插入查看数据
摘要:iOS sqlite数据库操作。步骤是:先加入sqlite开发库libsqlite3.dylib,新建或打开数据库,创建数据表,插入数据,查询数据并打印1、新建项目sqliteDemo,添加使用sqlite的库libsqlite3.dylib2、sqlite 的方法sqlite3 *db, 数据库句柄,跟文件句柄FILE很类似sqlite3_stmt *stmt, 这个相当于ODBC的Command对象,用于保存编译好的SQL语句 sqlite3_open(), 打开数据库,没有数据库时创建。 sqlite3_exec(), 执行非查询的sql语句 Sqlite3_step(), 在调用sql 阅读全文

posted @ 2013-09-22 15:17 Hai_阔天空 阅读(580) 评论(0) 推荐(1)

ios UITableView高度自适应(转)
摘要:1 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 2 // 列寬 3 CGFloat contentWidth = self.tableView.frame.size.width; 4 // 用何種字體進行顯示 5 UIFont *font = [UIFont systemFontOfSize:13]; 6 7 // 該行要顯示的內容 8 NSString *content = [data... 阅读全文

posted @ 2013-09-22 10:43 Hai_阔天空 阅读(1249) 评论(0) 推荐(0)

ios 将图片做成圆形
摘要:UIImageView * imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"oiuyfdsa.png"]]; imageView.frame = CGRectMake(20.f, 20.f, 100.f, 100.f); imageView.layer.masksToBounds = YES; imageView.layer.cornerRadius = 50; 阅读全文

posted @ 2013-09-18 13:02 Hai_阔天空 阅读(289) 评论(0) 推荐(0)

ios 如何对UITableView中的内容进行排序
摘要:- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{ return UITableViewCellEditingStyleNone;}//排序调整- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinati... 阅读全文

posted @ 2013-09-18 11:23 Hai_阔天空 阅读(734) 评论(0) 推荐(0)

ios 给键盘上面加上“完成”
摘要:#import @interface FirstViewController : UIViewController{ UITextField *textField1; UITextField *textField2; UISegmentedControl *_prevNext;}- (UIToolbar *)createActionBar;@end//// FirstViewController.m// MyTableViewDemo//// Created by Chocolate on 13-9-12.// Copyright (c) 2013年 Chocolat... 阅读全文

posted @ 2013-09-12 14:50 Hai_阔天空 阅读(1107) 评论(0) 推荐(0)

ios 自定义NavgationBar的按钮
摘要:UIImage *btnimage = [UIImage imageNamed:@"about.png"];UIButton *btn = [[UIButton alloc] initWithFrame:self.navigationController.navigationBar.frame];btn.showsTouchWhenHighlighted = YES;[btn addTarget:self action:@selector(infoAction:) forControlEvents:UIControlEventTouchUpInside];[btn setI 阅读全文

posted @ 2013-09-04 16:43 Hai_阔天空 阅读(495) 评论(0) 推荐(0)

ios UIImage图片拉伸 resizableImageWithCapInsets:
摘要:常见的按钮添加和背景设置如下:UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(80, 130, 160, 44)];[button setTitle:@”Test Button” forState:UIControlStateNormal];// Image with without cap insetsUIImage *buttonImage = [UIImage imageNamed:@”blueButton”];[button addTarget:self action:@selector(buttonPress 阅读全文

posted @ 2013-08-27 16:42 Hai_阔天空 阅读(2136) 评论(0) 推荐(0)

ios 图片拉伸不变形的方法
摘要:如果一个椭圆图片,原图大小为30*30,而我们让它显示100*30,那么这个图片就会被拉伸,而且效果很难看。用下边的方法可以创建一个局部不被拉伸的图片。UIImage * buttonBg = [[UIImage imageNamed:@"btn_normal.png"]stretchableImageWithLeftCapWidth:10topCapHeight:0];方法说明:- (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topC 阅读全文

posted @ 2013-08-27 16:21 Hai_阔天空 阅读(1034) 评论(0) 推荐(0)

ios 的ASIHTTPRequest学习
摘要:发起一个同步请求同步意为着线程阻塞,在主线程中使用此方法会使应用Hang住而不响应任何用户事件。所以,在应用程序设计时,大多被用在专门的子线程增加用户体验,或用异步请求代替(下面会讲到)。- (IBAction)grabURL:(id)sender{ NSURL *url = [NSURL URLWithString:@" http://allseeing-i.com"]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; [request startSynchronous]; NSError *e 阅读全文

posted @ 2013-08-27 16:00 Hai_阔天空 阅读(231) 评论(0) 推荐(0)

ios 使用ASIHTTPRequest来检查版本更新
摘要:1 - (void) alertWithTitle: (NSString *)_title_ msg:(NSString *)msg delegate:(id)_delegate cancelButtonTitle:(NSString*)_cancelTitle otherButtonTitles:(NSString*)_otherTitles{ 2 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:_title_ 3 ... 阅读全文

posted @ 2013-08-27 15:50 Hai_阔天空 阅读(346) 评论(0) 推荐(0)

ios ASIHTTPRequest类库简介和使用说明
摘要:官方网站: http://allseeing-i.com/ASIHTTPRequest/ 。可以从上面下载到最新源码,以及获取到相关的资料。使用iOS SDK中的HTTP网络请求API,相当的复杂,调用很繁琐,ASIHTTPRequest就是一个对CFNetwork API进行了封装,并且使用起来非常简单的一套API,用Objective-C编写,可以很好的应用在Mac OS X系统和iOS平台的应用程序中。ASIHTTPRequest适用于基本的HTTP请求,和基于REST的服务之间的交互。ASIHTTPRequest功能很强大,主要特色如下:l 通过简单的接口,即可完成向服务端提交数据和从 阅读全文

posted @ 2013-08-27 15:09 Hai_阔天空 阅读(256) 评论(0) 推荐(0)

ios 去除UITextField中的空格
摘要:NSString *qName =[userNameText.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; 阅读全文

posted @ 2013-08-27 14:47 Hai_阔天空 阅读(799) 评论(0) 推荐(0)

ios UITableView默认选中第一行
摘要:NSIndexPath *ip = [NSIndexPath indexPathForRow:0inSection:0];[titleTableViewselectRowAtIndexPath:ip animated:YESscrollPosition:UITableViewScrollPositionTop]; 阅读全文

posted @ 2013-08-27 13:37 Hai_阔天空 阅读(548) 评论(0) 推荐(0)

ios 监听设备旋转方向
摘要:-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{ if(fromInterfaceOrientation == UIInterfaceOrientationLandscapeLeft || fromInterfaceOrientation == UIInterfaceOrientationLandscapeRight) { } if (self.interfaceOrientation == UIDeviceOrientation... 阅读全文

posted @ 2013-08-27 13:34 Hai_阔天空 阅读(1076) 评论(0) 推荐(0)

上一页 1 ··· 7 8 9 10 11 12 下一页

导航