自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 遇到的一些小问题

iOS navigationBar.hidden 和 navigationBarHidden 的坑http://blog.csdn.net/u012636086/article/details/41803107iOS时间http://blog.csdn.net/sakulafly/article/details/8861067GCDhttp://blog.sina.com.cn/s/blog_626

2016-07-21 18:37:33 206

原创 自定义瀑布流

DKFlowLayout类DKFlowLayout.h// 在.h里@class, 在.m里#import@class DKFlowLayout;@protocol DKFlowLayoutDelegate <NSObject>- (CGFloat) layout: (DKFlowLayout *)layout heightForItemAtIndexPath:(NSIndexPath *) in

2016-04-05 09:13:03 254

原创 BaseModel

.h@interface BaseModel : NSObject+ (NSMutableArray *) baseModelByArr: (NSArray *) arr;@end.m@implementation BaseModel+ (NSMutableArray *) baseModelByArr: (NSArray *) arr { NSMutableArray *modelArr

2016-04-05 07:53:26 415

原创 DataBaseTool

.htypedef NS_ENUM(NSUInteger, SelectInDB) { SelectInTable, SelectNotInTable, SelectError,};@interface DataBaseTool : NSObject{ sqlite3 *dbPoint;}+ (instancetype)shareDataBase;// 判断当前

2016-04-05 07:48:33 750

原创 SavaTool_归档

.htypedef NS_ENUM(NSUInteger, DouBanType) { DouBanActivity, DouBanMovie, DouBanCinema,};@interface SaveTool : NSObject+ (BOOL) isActivityInPlist: (Activity *) act;+ (void) archiveActivity

2016-04-05 07:43:28 240

原创 数据持久化

前奏 文件的路径有几种方式获取, 比如直接从工程拽出来的路径是当前工程文件夹的路径, 这个路径会随着工程的移动而发生变化 也可通过 NSBundle 获取, bundle 可以获取工程里文件的路径, 这个路径不会随着工程的移动而变化 如果要做手机的缓存, 或者收藏功能, 上面两个路径是不能办到的, 我们需要把较为私密的内容放到手机的沙盒里进行保存 NSLog(@"%

2016-04-05 07:38:27 248

原创 NetWorkingTool

.h@protocol NetWorkingToolDelegate <NSObject>- (void)bringValue: (id) result;@end@interface NetWorkingTool : NSObject+ (void) toolWithURl: (NSString *) strURL block: (void (^) (id result)) block;@end.

2016-04-05 07:27:27 256

原创 网络请求

code准备工作// 用来装每次请求的数据@property (nonatomic, retain) NSMutableData *data;从 iOS9.0之后, 默认是 https请求, 如果想继续使用 http 请求, 需要在 info.plist 中加上一些内容, 内容如下:<key>NSAppTransportSecurity</key> <dict> <key>

2016-03-27 15:23:00 235

原创 UIImagePickerController, UISearchBar

codeUIImagePickerController1.签协议 2.某个 Button 的方法里{ UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.allowsEditing = YES; picker.delegate = self;

2016-03-27 14:11:17 197

原创 省市区存储数据

样本北京 1 北京市 1 西城区 1 东城区 2 ....天津 2 天津市 2 和平区 19 河东区 20 河西区 21 ...河北 3 石家庄市 3 长安区 37 桥东区 38 ... 唐山市 4 路北区 60 路南区 61 古冶区 62 开平区 63 ...

2016-03-27 13:44:05 1898

原创 UITableViewController

codeApp.m self.window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; [self.window makeKeyAndVisible]; [_window release]; // UITableViewController的创建 MyTableViewCo

2016-03-18 08:06:58 238

原创 UITableView

codeproperty

2016-03-15 08:21:03 297

原创 相册,循环滚动,可缩放

#import "ViewController.h"#define HEIGHT 400#define WIDTH self.view.frame.size.width@interface ViewController ()<UIScrollViewDelegate>@property(nonatomic, retain)UIScrollView *scrollView;@property

2016-03-13 12:30:24 238

原创 UINavigationController, UITabBarController

code通用AppDelegate.h#import "ViewController.h" self.window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; [self.window makeKeyAndVisible]; [_window release]; ViewCont

2016-03-13 12:23:38 224

原创 界面传值

属性传值ViewController向SecondViewController跳转 ViewController向SecondViewController传值1.sec.h // 第一步:在后一个页面写一个属性,用来接收从另一页面传过来的值@property (nonatomic, retain) NSString *str;2.view.m#import "SecondViewCon

2016-03-13 12:04:49 239

原创 UIScrollView、UIPageControl、NSTimer

UIScrollViewcode// 宽度为屏幕宽度9倍的UIScrollView UIScrollView *myScrollView = [[UIScrollView alloc] initWithFrame: self.view.frame]; myScrollView.backgroundColor = [UIColor lightGrayColor]; myScrol

2016-03-13 11:53:38 258

原创 毛玻璃效果

code毛玻璃效果 UIBlurEffect *blur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]; UIVisualEffectView *visualView = [[UIVisualEffectView alloc] initWithEffect: blur]; visualView.frame = s

2016-03-13 11:24:43 265

原创 UISlider、UIStepper、UISegmentControl、UISwitch、UIProgressView、UIActivityIndicatorView

codeUISlider UISlider *mySlider = [[UISlider alloc] initWithFrame:CGRectMake(80, 100, 250, 35)]; [self.view addSubview: mySlider]; [mySlider release]; [mySlider addTarget:self action:@se

2016-03-13 11:04:34 247

原创 事件和手势

code让视图跟着手指移动- (void) touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event { [super touchesBegan:touches withEvent:event]; // 获取触摸点的坐标// NSLog(@"%@", touches); // 1.先获取to

2016-03-13 09:56:42 216

原创 跳转

code按Button进行模态跳转// 在当前m中引入目标页面h文件- (void) click: (UIButton *) button{ // 模态跳转 // 1、创建目标页面的对象 SecondViewController *secVC = [[SecondViewController alloc] init]; // 2、设置跳转的动画样式 secVC

2016-03-12 21:54:27 211

原创 Label_TextField_自定义视图

LTView.h@interface LTView : UIView <UITextFieldDelegate>@property (nonatomic, retain) UILabel *myLabel;@property (nonatomic, retain) UITextField *myTextField;@endLTView.m#import "LTView.h"@implementa

2016-03-12 21:30:33 260

原创 UIImage

code图片,和灰色边界的原型图片 UIImageView *myImageView = [[UIImageView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)]; [self.view addSubview: myImageView]; [myImageView release]; myImageView.i

2016-03-12 21:11:59 173

原创 UITextField

code圆角,有占位符 UITextField *myTextField = [[UITextField alloc] initWithFrame:CGRectMake(100, 100, 190, 30)]; myTextField.borderStyle = UITextBorderStyleRoundedRect; myTextField.placeholder = @"

2016-03-12 19:14:26 275

原创 UIButton

codeUIButtonTypeSystem型,默认蓝色UIButton *myButton = [UIButton buttonWithType:UIButtonTypeSystem];myButton.frame = CGRectMake(100, 200, 150, 50);[myButton setTitle: @"MyButton" forState: UIControlStateNo

2016-03-12 18:58:42 196

原创 UIView、UIResponder、UIAlertView、UIActionSheet

Methodcode动画// 从原来的位置移到新的位置,与原来的大小没有关系[UIView animateWithDuration:5.5 animations:^{ myView.frame = CGRectMake(50, 50, 70, 70); }];

2016-03-12 18:12:51 210

原创 UILabel

UILabelUILabelcode文本中间对齐圆角边框propertyMethodcode文本中间对齐UILabel *myLabel = [[UILabel alloc] initWithFrame:CGRectMake(100, 100, 150, 35)];myLabel.text = @"This is a Label";myLabel.textAlignment = NST

2016-03-12 17:58:36 245

空空如也

空空如也

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

TA关注的人

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