UI
额炮楼寨子
啥也不会
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
多线程
线程:{ NSInteger _count; //锁 NSLock *_lock;} _lock=[[NSLock alloc] init]; //在didload里边初始化_lock第一种: NSThread *thred1=[[NSThread alloc]initWithTarget:self selector:@selec原创 2014-11-25 19:49:48 · 308 阅读 · 0 评论 -
监视,一旦改变执行下边的方法
- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. self.p=[[Person alloc] init]; self.p.name=@"Kim"; self.p.age=@"18";原创 2014-11-24 21:21:59 · 264 阅读 · 0 评论 -
UICollectView
1 :初始化 视图布局原创 2014-11-24 21:57:57 · 2825 阅读 · 0 评论 -
GCD
//GCD (先进先出 FIFO) //串行:前一个任务完成,后一个任务才能执行 //并行:任务在派发时是有序的,但是不用等第一个任务执行完成才开始. //GCD队列分为三种:主队列,全局队列,和自定义队列 1:使用主队列实现任务派发(串行),在主线程中//1.使用主队列实现任务派发(串行),在主线程中 dispatch_queue原创 2014-11-25 20:07:28 · 275 阅读 · 0 评论 -
设置textView根据输入的文字自动增加高度
#import "CWViewController.h"@interface CWViewController ()@end@implementation CWViewController- (void)viewDidLoad{ [super viewDidLoad]; //设置代理对象 self.textView.delegate=self; /原创 2014-11-24 19:57:33 · 556 阅读 · 0 评论 -
block块简单传值
在NextViewController.h里边声明原创 2014-11-24 20:08:31 · 314 阅读 · 0 评论 -
tabBarController简单属性
UIViewController *v1=[[UIViewController alloc] init]; v1.view.backgroundColor=[UIColor redColor]; UITabBarItem *v1BI=[[UITabBarItem alloc] initWithTabBarSystemItem: UITabBarSystemItemFavorites原创 2014-11-24 20:14:38 · 352 阅读 · 0 评论 -
appearance一键换肤
//一键换肤 [[UINavigationBar appearance]setBarTintColor:[UIColor blueColor]]; [[UITabBar appearance] setBarTintColor:[UIColor purpleColor]];原创 2014-11-24 20:19:14 · 394 阅读 · 0 评论 -
自己封装的读取图片的工具 类目
Uiimage+ImageDownLoad原创 2014-11-24 21:13:00 · 315 阅读 · 0 评论 -
获取DocumentsPath路径 简单文件写入
//访问沙盒路径 //1.Home主目录,里面有 :Documents.Library.temp 和一个应用程序 // NSLog(@"Home:%@",NSHomeDirectory()); //2,Documents NSString *DocumentsPath=NSSearchPathForDirectoriesInDoma原创 2014-11-24 21:29:51 · 1392 阅读 · 0 评论 -
数据库,归档,反归档 修改删除文件夹
创建修改文件夹删除文件夹//NSFileManager //创建文件夹 //1.在Documents创建一个文件夹 NSString *documentPath=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0]; // NSLog(@"do原创 2014-11-24 21:39:45 · 370 阅读 · 0 评论 -
简单数据持久化/NSUserDefaults(单例) 登陆界面简单验证
声明两个@property (strong, nonatomic) IBOutlet UITextField *userName;@property (strong, nonatomic) IBOutlet UITextField *passWord;原创 2014-11-24 21:51:58 · 338 阅读 · 0 评论 -
IOS设备 UIDevice 获取操作系统 版本 电量 临近手机触发消息检测 (转载)
- (void)viewDidLoad{[super viewDidLoad];// 操作系统NSString * osName =[[UIDevice currentDevice]systemName];// 操作系统版本NSString * systemVersion =[[UIDevice currentDevice]systemVersion];转载 2014-12-24 18:42:09 · 816 阅读 · 0 评论 -
跑马灯效果动画
UILabel *label3 = [[UILabel alloc] initWithFrame:CGRectMake(10,300, 300, 100)]; label3.text =@"噜啦啦噜啦啦噜啦"; [self.view addSubview:label3]; CGRect frame = label3.frame;转载 2015-01-15 20:35:27 · 848 阅读 · 0 评论 -
UIView视图层级,Label, TextField,UIButton
[self.window insertSubview:view5 aboveSubview:view1]; //yi [view5 removeFromSuperview]; [self.window exchangeSubviewAtIndex:1 withSubviewAtIndex:2];转载 2014-11-22 15:01:35 · 687 阅读 · 0 评论 -
网络解析
先声明 #import "CWViewController.h"//get请求的url#define BASE_URL @"http://project.lanou3g.com/teacher/yihuiyun/phpJSON.php"//post请求的url#define BASE_URL_2 @"http://ipad-bjwb.bjd.com.cn/DigitalPublic原创 2014-11-24 20:57:41 · 371 阅读 · 0 评论 -
数据解析
1 xml sax解析 系统自带原创 2014-11-24 20:43:55 · 347 阅读 · 0 评论 -
SQLite数据库
先建立一个Student类声明:@property(nonatomic,copy)NSString *name;@property(nonatomic,copy)NSString *sex;@property(nonatomic,copy)NSString *age;原创 2014-11-24 21:43:42 · 365 阅读 · 0 评论 -
动画,(UIView上)
//UIView动画 //开始动画 [UIView beginAnimations:nil context:nil]; //运动的时间 [UIView setAnimationDuration:2.0f]; //延时启动 //[UIView setAnimationDelay:2.f]; //速度曲线 [UIVie原创 2014-11-26 19:21:08 · 298 阅读 · 0 评论 -
动画 CALayer
UIView的属性动画,会修改属性产生动画.CALayer,没有修改UIView属性.初始化myView@property (nonatomic,strong)UIView *myView;self.myView=[[UIView alloc] initWithFrame:CGRectMake(50, 50, 100, 100)]; self.myVi原创 2014-11-26 19:28:55 · 380 阅读 · 0 评论 -
ImageView旋转,捏合,拉动,....
RootView原创 2014-11-22 16:33:35 · 471 阅读 · 0 评论 -
Slider 基本属性,
Slider 初始化原创 2014-11-22 19:38:54 · 2244 阅读 · 0 评论 -
UISegmentedControl 基本属性,
初始化 NSArray *array=@[@"红",@"黄",@"蓝"]; //数组中有多少个元素,分段控制就有多少条目(分段) self.seg=[[UISegmentedControl alloc] initWithItems:array]; self.seg.frame=CGRectMake(50, 100, 200, 50); //选中哪一个分段原创 2014-11-22 19:45:04 · 361 阅读 · 0 评论 -
UIScrollView和UIPageControl结合实现简单图片浏览
定义声明@interface RootView : UIView@property(nonatomic,retain)UIScrollView *scroll;@property(nonatomic,retain)UIPageControl *page;@end原创 2014-11-22 20:01:07 · 375 阅读 · 0 评论 -
鼠标移动UIview 位置随着鼠标改变
@interface TestView(){ //开始触摸这个点 CGPoint _startPoint; }@end//当你开始触摸的时候,到这看看.//一次出没时间发生时,该方法只执行一次.-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ //取出手指触碰原创 2014-11-22 16:11:56 · 447 阅读 · 0 评论 -
GData第三方文件引入流程
1:Gdata文件拖入2:.h文件中找注释 /user/include/libxml2BuildSettings 搜索 search path找到 Header Search Paths双击右边加号 ,, 填进去/usr/include/libxml23:搜索 Other linkOther linker flags 右边加上 -lxml24:Build Ph原创 2014-11-27 21:18:38 · 416 阅读 · 0 评论 -
代理传值
1:新建协议@protocol PassValueDelegate -(void)passValueWithLableString:(NSString *)labelString textString:(NSString *)textString;@end原创 2014-11-22 20:19:27 · 304 阅读 · 0 评论 -
UIapplication 执行顺序
//在AppDelegate 里边的.- (void)applicationWillResignActive:(UIApplication *)application{ NSLog(@"将要进入不活跃状态");}- (void)applicationDidEnterBackground:(UIApplication *)application{原创 2014-11-27 17:31:24 · 343 阅读 · 0 评论 -
TableViewCell添加和删除
延展声明{ UITableViewCellEditingStyle _style;}原创 2014-11-22 20:31:18 · 555 阅读 · 0 评论 -
UIScrollView基本属性
初始化UIImage *imag=[UIImage imageNamed:@"13.png"]; //滚动视图 self.scroll=[[UIScrollView alloc] init]; self.scroll.frame=[UIScreen mainScreen].bounds; //内容尺寸 self.scroll.conten原创 2014-11-22 19:51:18 · 352 阅读 · 0 评论 -
根据文字自定义Label和Cell高度
方法:+(CGFloat)cellHeight:(NSString *)text{ //死值和文字的高度 return 20+60+10+20+[[self class]textHeight:text];}//计算文字的高度+(CGFloat)textHeight:(NSString *)aString{ NSDictionary *dic=@{NSFont原创 2014-11-22 20:45:24 · 412 阅读 · 0 评论 -
加载动画
//声明加载view的动画路径 UIBezierPath *pacmanOpenPath; CGFloat radius = 15.0f; CGPoint arcCenter = CGPointMake(radius, radius); //定制一段圆弧 pacmanOpenPath = [UIBezierPath bezierPathW转载 2015-04-24 17:14:21 · 386 阅读 · 0 评论
分享