自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(40)
  • 收藏
  • 关注

原创 手势识别器

MainViewController.m#import "MainViewController.h"@interface MainViewController ()@property(nonatomic, retain)UIImageView *imageView;@property(nonatomic, retain)UIAlertView *alertView;@end@implementat

2015-08-19 21:30:21 347

原创 数据持久化 将数据写入到本地 文件管理

ViewController.m#import "ViewController.h"#import "Student.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; // 苹果手机为了保证自己数据上的绝对安全,设计了

2015-08-19 21:22:02 1092

原创 UITableViewController

MyTableViewController.m#import "MyTableViewController.h"@interface MyTableViewController ()@property(nonatomic,retain)NSMutableArray *arr;@property(nonatomic,retain)UIRefreshControl *control;@end@im

2015-08-19 21:07:40 315

原创 NETWorkingTool 网络封装 协议传值 Block传值

AppDelegate.m#import "AppDelegate.h"#import "MainViewController.h"@interface AppDelegate ()@end@implementation AppDelegate-(void)dealloc{ [_window release]; [super dealloc];}- (BOOL)appl

2015-08-19 21:04:53 344

原创 图片相关 UIActionSheet

ViewController.m#import "ViewController.h"#import "UIImageView+WebCache.h"#import "UIImage+GIF.h"@interface ViewController ()<UIActionSheetDelegate,UINavigationControllerDelegate,UIImagePickerControl

2015-08-19 20:49:42 463

原创 接口

在storyboard上铺五个button,并且写出点击方法.分别为: synGET synPOST asynGET asynPOST blockGETGET同步请求将地址赋给一个字符串NSString *strURL=@"http://api.map.baidu.com/place/v2/search?query=银行&region=大连&output=json&ak=6E823f58

2015-08-17 21:21:09 335

原创 播放器 基本控件实现

MainViewController.m属性等#import "MainViewController.h"#import <AVFoundation/AVFoundation.h>#import "SecondViewController1.h"#define WIDTH self.view.frame.size.width#define HEIGHT self.view.frame.siz

2015-08-13 20:57:30 469

原创 UITabBarItem 快捷菜单

AppDelegate.m// 创建六个tabBarItem#import "AppDelegate.h"#import "FirstViewController.h"#import "SecondViewController.h"#import "ThirdViewController.h"#import "FourthViewController.h"#import "FifthVi

2015-08-13 20:46:09 456

原创 Block数组练习

用Block从后面传一个字符串到前面并且添加到前面的联系人中MainViewController.m#import "MainViewController.h"#import "SecondViewController.h"@interface MainViewController ()<UITableViewDataSource,UITableViewDelegate>@property(n

2015-08-13 20:36:02 482

原创 Block传值

准备工作,设置跟视图控制器和两个viewControllerblock的调用在MainViewController中铺一个buttonUIButton *button=[UIButton buttonWithType:UIButtonTypeRoundedRect]; button.layer.borderWidth=1; button.frame=CGRectMake(100, 1

2015-08-13 20:25:20 305

原创 UITextField总结

#import "MainViewController.h"#define WIDTH self.view.frame.size.width@interface MainViewController ()<UITextFieldDelegate>@property(nonatomic,retain)UITextField *textField;@end@implementation Main

2015-08-13 17:58:17 219

原创 UILabel 总结

#import "MainViewController.h"#define WIDTH self.view.frame.size.width#define HEIGHT self.view.frame.size.height@interface MainViewController ()@property(nonatomic,retain)UILabel *label;@end@imple

2015-08-13 17:54:54 320

原创 cell 内容编辑

MainViewController.m#import "MainViewController.h"@interface MainViewController ()<UITableViewDelegate,UITableViewDataSource>@property(nonatomic,retain)UITableView *tableView;@property(nonatomic,reta

2015-08-12 22:52:56 415

原创 DCIM 用 UIScrollView 和UIPageControl

准备工作不赘述相册 点开之后点击每个图片跳转到图片的详情面,滑动图片下面的UIPageControl跟着滑动MainViewController.m#import "MainViewController.h"#import "LTView.h"#import "SecondViewController.h"@interface MainViewController ()@property(n

2015-08-12 22:40:49 251

原创 UIPageControl

准备工作不赘述MainViewController.m#import "MainViewController.h"#import "LTView.h"#define WIDTH self.view.frame.size.width#define HEIGHT self.view.frame.size.height@interface MainViewController ()<UIScrol

2015-08-12 22:30:06 306

原创 带分区的省市区字典数组

准备工作不再赘述一个tableView TitleForHeader为省名,分区个数为省的个数,每个分区中的cell.textLabel.text为省对应的市名MainViewController.m#import "MainViewController.h"#import "SecondViewController.h"@interface MainViewController ()<UIT

2015-08-12 22:23:01 578

原创 自定义TableView 继承, cell, model

准备工作不赘述 MainViewController.m#import "MainViewController.h"#import "MyCell.h"#import "MyCell2.h"#import "Student.h"#define WIDTH self.view.frame.size.width#define HEIGHT self.view.frame.size.heigh

2015-08-12 22:09:03 283

原创 一个ViewController里有三个TableView,分别为省市区,逐级跳转

准备工作不赘述 MainViewController.m#import "MainViewController.h"#import "SecondViewController.h"#define WIDTH self.view.frame.size.width#define HEIGHT self.view.frame.size.height@interface MainViewContr

2015-08-12 21:58:32 411

原创 一个TableView实现省市区字典数组的跳转

AppDelegate.m#import "AppDelegate.h"#import "MainViewController.h"@interface AppDelegate ()@end@implementation AppDelegate-(void)dealloc{ [_window release]; [super dealloc];}- (BOOL)applic

2015-08-12 21:53:09 339

原创 TableView省市区数组字典 属性传值

三个tableView分别显示省 市 区 点击省跳转相应的市,点击市跳转相应的区MainViewController.h#import <UIKit/UIKit.h>@interface MainViewController : UIViewController@property(nonatomic,retain)NSMutableArray *cityArr;@property(nonato

2015-08-12 21:48:07 360

原创 ScrollView

#import "MainViewController.h"#define WIDTH self.view.frame.size.width#define HEIGHT self.view.frame.size.height@interface MainViewController ()<UIScrollViewDelegate>@end@implementation MainViewContr

2015-08-12 20:43:05 755

原创 GIF动图 SegmentControl

准备工作不赘述放入三组连续的图片 MainViewController.m#import "MainViewController.h"#define WIDTH self.view.frame.size.width#define HEIGHT self.view.frame.size.height@interface MainViewController ()@property(nonat

2015-08-12 20:33:59 305

原创 UIControl 音乐播放 gif动图

AppDelegate里的准备工作不再赘述MainViewController.m#import "MainViewController.h"#import <AVFoundation/AVFoundation.h>@interface MainViewController ()@property(nonatomic,retain)UIStepper *stepper;@property(n

2015-08-12 20:26:46 1724

原创 UIViewController

AppDelegate.m#import "AppDelegate.h"#import "RootViewController.h"@interface AppDelegate ()@end@implementation AppDelegate-(void)dealloc{ [_window release]; [super dealloc];}// 告诉主程序win

2015-08-12 20:11:05 209

原创 文章标题

AppDelegate.m#import "AppDelegate.h"#import "RootViewController.h"@interface AppDelegate ()@end@implementation AppDelegate-(void)dealloc{ [_window release]; [super dealloc];}// 告诉主程序win

2015-08-12 20:07:33 219

原创 UIViewController

AppDelegate.m#import "AppDelegate.h"#import "RootViewController.h"@interface AppDelegate ()@end@implementation AppDelegate-(void)dealloc{ [_window release]; [super dealloc];}// 告诉主程序win

2015-08-12 20:06:06 220

原创 LTView

LTView.h#import <UIKit/UIKit.h>@interface LTVIew : UIView<UITextFieldDelegate>// 因为要在类的外部获取输入框的内容,修改label的标题,所以我们可以把这两部分作为属性写在.h文件中,这样在外部可以直接进行修改和设置@property(nonatomic,retain)UILabel *myLabel;@prop

2015-08-12 19:44:24 268

原创 Calculator

AppDelegate.h#import <UIKit/UIKit.h>@interface AppDelegate : UIResponder <UIApplicationDelegate>@property (retain, nonatomic) UIWindow *window;@endAppDelegate.m#import "AppDelegate.h"#import "RootVi

2015-08-06 21:05:55 376

原创 登陆界面(LTView,UITextField,UIButton)

设置几个类 AppDelegate LTView RootViewController LoginViewController RegistViewController PasswordViewControllerAppDelegate.mapplication中// 设置一个UIViewControllerRootViewController *rootVC=[[RootViewC

2015-08-06 20:56:48 524

原创 UITextField

创建输入框UITextField *text1 = [[UITextField alloc] initWithFrame:CGRectMake(100, 100, 100, 30)];text1.backgroundColor = [UIColor yellowColor]; [self.window addSubview:text1];[text1 release];边框 圆角 te

2015-08-06 20:35:34 259

原创 UIButton

用button自己的便利构造器的方式来创建对象UIButton *button =[UIButton buttonWithType:UIButtonTypeSystem];指定button的位置和大小button.frame=CGRectMake(100, 100, 100, 70);设置背景颜色button.backgroundColor=[UIColor yellowColor];[self.

2015-07-29 22:35:24 214

原创 UILabel

如果使用MRC,-(BOOL)中需要写一个[_window release],在这里如果写[self.window release]也可以,相当于把释放交给系统,但是会延迟释放创建一个UILabelUILabel *label=[[UILabel alloc]initWithFrame:CGRectMake(50, 100, 100, 150)];label.backgroundColor=[UI

2015-07-29 21:53:59 251

原创 UIView

MRC系统生成的工程默认为ARC,如果使用MRC,则需要写一个dealloc方法-(void)dealloc{ [_window release];// 针对window属性写一个dealloc [super dealloc];}创建一个UIView1.创建对象UIView *view1=[[UIView alloc]initWithFrame:CGRectMake(100,

2015-07-29 21:09:15 237

原创 OC10-Block

栈区int a = 10;NSLog(@"%p",&a);堆区int *p=malloc(40);NSLog(@"%p",p);全局静态区static int b = 10;NSLog(@"%p", &b);常量区常量字符串char *str="iPhone";NSLog(@"%p",str);代码区xx.mint addNum(int a,int b){ return a+b;

2015-07-29 20:23:04 319 1

原创 OC-值对象, NSSet, NSDate

迭代器NSEnumerator *enumetator=[arr objectEnumerator]; NSString *str=nil; while (str=[enumetator nextObject]) { NSLog(@"%@",str); }字典NSEnumerator *enumetator2=[dic objectEnumerator];

2015-07-23 21:33:26 353 1

原创 OC-省市区字典数组

省市区数组NSString *path=@"/Users/dlios/Desktop/笔记/oc笔记/OC6-省市区字典数组/OC6-省市区字典数组/area.txt"; // 根据路径产生相应的字符串 NSString *str=[NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:ni

2015-07-23 21:01:37 275

原创 OC-字典

创建字典对象NSDictionary *dic=[[NSDictionary alloc]init];便利构造器创建NSDictionary *dic=[NSDictionary dictionary];// NSDictionary *dic=[[NSDictionary alloc]initWithObjectsAndKeys:@"1",@"2",@"3",@"4", nil];//

2015-07-23 20:57:45 261

原创 OC-省市区数组

省市区数组 // 先找到文件对应的路径 NSString *path=@"/Users/dlios/Desktop/笔记/oc笔记/OC5-数组省市区/OC5-数组省市区/area.txt"; // 通过路径产生字符串,内容就是txt文本的内容 NSString *str=[NSString stringWithContentsOfFile:path encoding:NSU

2015-07-23 20:15:36 341 1

原创 OC-数组

数组初始值的设置NSArray *arr=@[@"1",@"2",@"3",@"4",@"5"];数组里的元素个数NSLog(@"%ld",arr.count);取值NSLog(@"%@",[arr objectAtIndex:1]);NSLog(@"%@",arr[1]);// 两种方法对数组进行遍历for (NSInteger i=0; i<arr.count; i++) {

2015-07-23 20:13:40 295

原创 OC基本数据类型-NSString

通过字面量的方式创建一个字符串NSString *str=@”杨林qwertyuiop”用点方法打印字符串的长度NSLog(@”%ld”,str.length);打印下标为4的字符NSLog(@”%c”,[str characterAtIndex:4]);通过alloc和init创建一个空字符串NSString *str1=[[NSString alloc]init]; NSString *str

2015-07-23 19:35:08 491

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除