
IOS API
文章平均质量分 93
MyObject-C
从事于游戏、广告、推荐、金融交易相关后台开发
展开
-
UIAlertView
ViewController.m文件添加代码 - (IBAction)displayAlertBtn:(id)sender { UIAlertView *alert1 = [[UIAlertView alloc] initWithTitle:@"aa" message:@"bb" delegate:self cancelButtonTitle:@"dd" otherButtonTitle原创 2014-03-03 10:33:15 · 611 阅读 · 0 评论 -
数据存储学习
使用文件持久化 - (NSString*)filePath { NSArray *documentDir = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *doc = [documentDir objectAtIndex:0]; ret原创 2014-03-18 22:14:31 · 465 阅读 · 0 评论 -
pass2word例子---------------学习FMDB使用
http://blog.devtang.com/blog/2012/04/22/use-fmdb/ 前言 SQLite (http://www.sqlite.org/docs.html) 是一个轻量级的关系数据库。iOS SDK很早就支持了SQLite,在使用时,只需要加入 libsqlite3.dylib 依赖以及引入 sqlite3.h 头文件即可。但是,原生的SQLite转载 2014-03-18 21:08:28 · 422 阅读 · 0 评论 -
相机学习
[objc] view plaincopy @interface ViewController () @property (weak, nonatomic) IBOutlet UIImageView *imView; @end @implementation ViewController { UIImagePick原创 2014-03-18 16:46:07 · 472 阅读 · 0 评论 -
pray例子----------------------设置navigation 与 其按钮背景
navigation [html] view plaincopy - (void)renderNv { UIImage *backgroundImage = [UIImage imageNamed:@"nv.png"]; //获取图片 CGRect rt = self.navigationController.原创 2014-03-18 21:09:34 · 402 阅读 · 0 评论 -
pray例子----------------------获取时间,碰触背景键盘消失
[objc] view plaincopy - (NSString*)getDate { NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setDateStyle:NSDateFormatterMediumStyle]; [f原创 2014-03-18 21:09:19 · 433 阅读 · 0 评论 -
pass2word例子---------------启动密码存储
设置密码 [objc] view plaincopy #pragma mark-- switch change - (void)switchChanged:(id)sender { if (_passwordProtect.on == NO) { _passwordProtectAle原创 2014-03-18 21:07:35 · 719 阅读 · 0 评论 -
pray例子----------------------获取地理位置
[objc] view plaincopy #import @interface PBTextViewController () @property (weak, nonatomic) IBOutlet UIImageView *bkImageView; [objc] view plain原创 2014-03-18 21:09:05 · 529 阅读 · 0 评论 -
uitableview学习
设置圆角 - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view from its nib. self.mytv.layer.cornerRadius = 8.0; } 响应单元格右侧按钮 - (void)tableView原创 2014-03-17 19:59:45 · 333 阅读 · 0 评论 -
自制按钮返回界面
- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view from its nib. UIBarButtonItem *rightBtnItem = [[UIBarButtonItem alloc] initWithBarButtonSystemI原创 2014-03-04 13:49:46 · 724 阅读 · 0 评论 -
从子界面获取数据返回给主界面
子界面 @protocol getLabelDelegate - (void)getNString:(NSString *)str; @end @interface AddViewController : UIViewController @property (weak, nonatomic) id delegate; @end - (void)viewDidLoad {原创 2014-03-04 13:53:48 · 1390 阅读 · 0 评论 -
使用自制cell
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ static NSString *cellIdentify = @"MyTableViewCellIdentity"; MyTableViewCell *cell =原创 2014-03-04 11:31:06 · 486 阅读 · 0 评论 -
子界面进入主界面更新主界面数据源
[self.myTableView reloadData];原创 2014-03-04 14:33:08 · 435 阅读 · 0 评论 -
切换界面导航遮挡问题
self.edgesForExtendedLayout = UIRectEdgeNone;原创 2014-03-04 14:02:57 · 558 阅读 · 0 评论 -
增加bar button item后弹出新界面
- (void)viewDidLoad { [super viewDidLoad]; UIBarButtonItem *barLeftItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(add)];原创 2014-03-04 10:54:52 · 574 阅读 · 0 评论 -
学习一
cocoa touch 是百分百面向对象的,使用MVC设计模式,原创 2014-04-23 18:34:18 · 435 阅读 · 0 评论