iOS
我扶奶奶过哈登
orz
展开
-
IOS 仿自带计算器
ViewController.h#import @interface ViewController :UIViewController{ UIButton * btn; UILabel *label; UIButton *btn0; UIButton *btndian; int btn_width,原创 2016-03-22 14:34:17 · 704 阅读 · 0 评论 -
ios切换界面
- (void)viewDidLoad { [super viewDidLoad]; button1 = [[UIButton alloc]initWithFrame:CGRectMake(50, 50, 100, 50)]; button1.backgroundColor = [UIColor redColor]; [button1 addTarget:self a原创 2016-04-19 11:27:21 · 491 阅读 · 0 评论 -
IOS plist读取写入
new_file plist Property List.plist 读取本地plistNSString *plistPath = [[NSBundle mainBundle] pathForResource:@"Property List" ofType:@"plist"]; NSMutableDictionary *data = [[NSMutableDictionary alloc]原创 2016-04-18 20:15:24 · 428 阅读 · 0 评论 -
IOS多线程下载图片
ViewController.h#import <UIKit/UIKit.h>@interface ViewController : UIViewController{ UIImageView *imageView;}@property(nonatomic, retain) IBOutlet UIImageView *imageView;@end上面定义一个imageViewViewCo原创 2016-04-18 19:35:11 · 355 阅读 · 0 评论 -
XCode快捷键
XCode快捷键如图原创 2016-04-18 15:16:51 · 254 阅读 · 0 评论 -
UITabBarController使用
创建TabBarViewCon类继承UITabBarController类 没有代码然后创建两个子类 ViewController和ViewController2ViewController- (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor=[UIColor redColor]; //设置视转载 2016-05-10 12:00:40 · 357 阅读 · 0 评论 -
UITabBar
UILabel *mytblabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];mytblabel.text = @"title";UIBarButtonItem *mybarLabel = [[UIBarButtonItem alloc]initWithCustomView:mytblabel];原创 2016-03-29 11:25:32 · 253 阅读 · 0 评论 -
IOS UIToolBar
是一条显示 上面可以放一些东西 如UiBarButtonItem首先创建两个 UIBarButtonItemUIBarButtonItem *mybb1 = [[UIBarButtonItem alloc]initWithTitle:@"MYBB1" style:UIBarButtonItemStylePlain target:self action:@selector(item1Action)];原创 2016-03-29 10:49:48 · 431 阅读 · 0 评论 -
ios 设置 applicationIconBadgeNumber(多少消息未读)
先加权限UIUserNotificationSettings *mySettings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeBadge categories:nil]; [[UIApplication sharedApplication] registerUserNotificationSet原创 2016-04-14 09:30:14 · 3611 阅读 · 0 评论 -
ios 跳转到地图指定位置
先声明一个button 叫 myBtnmyBtn = [[UIButton alloc]initWithFrame:CGRectMake(50, 50, 100, 50)]; myBtn.backgroundColor = [UIColor grayColor]; [myBtn addTarget:self action:@selector(myButtonPressed:) for原创 2016-04-14 09:22:10 · 976 阅读 · 0 评论 -
获取ios版本号
NSLog(@"%@", [[UIDevice currentDevice] systemVersion]);原创 2016-04-14 09:16:25 · 366 阅读 · 0 评论 -
IOS UIPanGestureRecognizer 移动图片
先设置一个 UIImageView *imageView; 用来移动实例化imageViewimageView = [[UIImageView alloc]initWithFrame:CGRectMake(20, 20, 100, 100)];[imageView setImage:[UIImage imageNamed:@"1.jpg"]];[self.view addSubview:imag原创 2016-04-13 21:21:00 · 1145 阅读 · 0 评论 -
iOS点击完按钮 出现 keyboard 并且屏幕上移
ViewController.h@interface ViewController :UIViewControllerUITextFieldDelegate>{ UITextField * myDemoTextFiled; UIButton * myDemoButton; UIView *myTextFieldStatusView;}原创 2016-03-14 20:20:33 · 736 阅读 · 0 评论 -
MAC 虚拟机 IOS simulator 的快捷键操作
调整模拟器大小 commond + 1 或2或3或4模拟器水平或竖直 commond + ⬅️ 或 common + ➡️虚拟机没有home键 只能 commond shif h原创 2016-03-11 11:10:25 · 6270 阅读 · 0 评论 -
IOS中字符串三种相加方法(转)
NSString* string; // 结果字符串NSString* string1, string2; //已存在的字符串1. string = [NSString initWithFormat:@"%@%@", string1, string2 ];2. string = [string1 stringByAppendingString:string2];//推荐这种方法转载 2016-03-11 10:36:47 · 2266 阅读 · 0 评论 -
IOS 图片 移动 缩放 旋转 transform属性
#import "YYViewController.h"//私有扩展@interface YYViewController ()@property(nonatomic,weak)IBOutlet UIButton *headImageView;@end@implementation YYViewController//枚举类型,从1开始//枚举类型有一个很大的作用,就是用来代替程序中的魔法数字转载 2016-04-24 17:13:20 · 1611 阅读 · 2 评论