iOS UI Demo 及总结
打鱼的阿猫
这个作者很懒,什么都没留下…
展开
-
界面之间2种正向 6种反向传值方式
正向传值: 一 一、利用block来进行 b 界面向 a 界面反向传值 a 中声明一个 block 属性,将所要传的值放入block 函数指针中,b 去接收 .h文件 @property(nonatomic,copy) void(^blockColor) (UIColor *); .m 文件 self.blockColor([U原创 2014-10-22 21:07:23 · 1084 阅读 · 0 评论 -
IOS 中设置UITextView 显示文本的光标
textView.selectedRange=NSMakeRange(0,0) ; //起始位置 textView.contentInset = UIEdgeInsetsMake(-24, -6, 0, 0); // 内容的位置 第一个textfield return 之后,第二个textview 获取原创 2015-08-19 10:15:16 · 2849 阅读 · 0 评论 -
UITableView 删除cell 的问题
// 错误写法 -(void)deleteTabelCellAction:(NSIndexPath *)indexPath { [_tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; [_questionArray removeObjectAtIn原创 2015-08-19 14:42:10 · 490 阅读 · 0 评论 -
UIActionSheet
- (void)willPresentActionSheet:(UIActionSheet *)actionSheet { NSArray *subViews = actionSheet.subviews; for (UIView *subViwe in actionSheet.subviews) { if ([subViwe原创 2015-07-29 16:02:53 · 418 阅读 · 0 评论 -
cell 复用问题 cell中控件单选,多选,带标签图的不可选中
// // AddVisitTimeVC.h // com.yx129.yxClientDoctor3 // // Created by yx on 15/1/30. // Copyright (c) 2015年 Guangzhou Yixiang Internet Technology Development Limited. All rights reserved. // #impo原创 2015-02-02 11:33:41 · 1156 阅读 · 0 评论 -
uitextField 收键盘操作
#pragma mark - 收键盘 -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [self.view endEditing:YES]; // 当多个textfield 时,不可用 这种方法 // [_acountTF resignFirstResponder]; //原创 2014-12-09 16:58:14 · 522 阅读 · 0 评论 -
UIView 基础动画
// // CHAppDelegate.m // uiAn动画 // // Created by imac on 14-10-14. // Copyright (c) 2014年 ___FULLUSERNAME___. All rights reserved. // #import "CHAppDelegate.h" @implementation CHAppDelegate {原创 2014-12-08 10:54:22 · 446 阅读 · 0 评论 -
navigationbar 背景 高度问题
/** * 系统默认 navigationBar 半透明,子视图的原点默认从 屏幕的(0,0)点为参考点,相当于整个视图中不存在navigationbar 这个视图。 navi.navigationBar.translucent = NO; // 设置为不透明, 不透明之后,子视图的参考点,会以 navigationbar原创 2014-12-05 11:31:54 · 816 阅读 · 0 评论 -
十六进制颜色 转为 uicolor ,定义有颜色的字符串,不同颜色字符串的拼接
/** * 拼接字符串 */ -(NSMutableAttributedString *)obtainResultWithColorAndStringDictionary:(NSDictionary *)dic { NSMutableAttributedString * result = [[NSMutableAttributedString alloc] init]; NS原创 2014-12-04 19:23:10 · 591 阅读 · 0 评论 -
uinavigationbar , tabbar 背景色设置 常见错误
- (void)viewDidLoad { [super viewDidLoad]; // 设置 tabbar 图片透明显示部分 :顶部,连同状态栏的颜色都被设置成橘色 [[UITabBar appearance] setTintColor:[UIColor orangeColor]]; NSMutableArray *nvcArr = [NSM原创 2014-12-02 13:37:00 · 877 阅读 · 0 评论 -
iOS地图位置开发
iOS地图位置开发 iPhone SDK提供了三个类来管理位置信息:CLLocation CLLocationManager 和 CLLHeading(不常用)。除了使用GPS来获取当前的位置信息外,iPhone也可以基于WiFi基站和无线发射塔来获得位置信息。GPS的精度最高,可以精确到米级别,但是也最耗电。 ------------CLLocation CLLoc转载 2014-11-24 21:11:32 · 488 阅读 · 0 评论 -
模拟器无法定位经纬度的问题
2014-11-24 20:25:22.987 simpleMapDemo[1560:60b] location failed:Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error 0.)"转载 2014-11-24 20:28:39 · 4635 阅读 · 0 评论 -
屏幕适配
// // RootViewController.m // 屏幕适配 // // Created by zm on 14-11-25. // Copyright (c) 2014年 practice. All rights reserved. // #import "RootViewController.h" @interface RootViewController () {原创 2014-11-25 14:16:40 · 387 阅读 · 0 评论 -
屏幕适配关键代码
- (void)viewDidLoad { [super viewDidLoad]; // 判断设备类型 iphone or ipad if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { viewWidth = IPHONE_VIEW_WIDTH; view原创 2014-11-25 18:00:53 · 397 阅读 · 0 评论 -
iPad 编程 分割视图
#import "AppDelegate.h" #import "LeftViewController.h" #import "RightViewController.h" @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSD原创 2014-11-25 13:14:08 · 597 阅读 · 0 评论 -
uitextfiled 输入 过滤
// 空格过滤 -(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { NSString *str = textField.text; NSCharacterS原创 2015-08-20 17:51:36 · 456 阅读 · 0 评论