自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

晓鱼儿的专栏

善始者实繁,克终者盖寡

  • 博客(23)
  • 资源 (3)
  • 收藏
  • 关注

转载 Objective-c 中 nil, Nil, NULL和NSNull的区别

nil: A null pointer to an Objective-C object.( #define nil ((id)0)  )Nil: A null pointer to an Objective-C class.NULL: A null pointer to anything else,  is for C-style memory pointers.

2013-12-26 19:19:08 606

原创 ios6和ios7区别

ios6和ios7在界面上有些区别ios6中1.statusBar是20,也就是屏幕实际只用到460,但我们加控件或者什么到界面上,坐标应从 (0,0)开始2.navigationController  push 过来的页面,界面上的东西会自动下移44的高度iOS 7中1..statusBar也是20,但状态栏是透明的,相当于位于屏幕最上层,为避免界面上的东西和它重

2013-12-18 17:02:47 1557

原创 设置bar的颜色,setTinColor&setBarTintColor

在ios7.0中setTinColor不能改变它的背景色,而要用setBarTintColor /* The behavior of tintColor for bars has changed on iOS 7.0. It no longer affects the bar's background and behaves as described for the

2013-12-16 13:49:48 2528

原创 sqlite简单实用(整理)

#import #import #define DBNAME @"BOOKCOLLECT.sqlite"#define TABNAME @"bookcollect"#define BOOKNAME @"bookname"#define BOOKCHAPTER @"book"@interface AppDelegate : UIResponder @property (strong,

2013-12-13 13:08:19 880

原创 <MessageUI/MessageUI.h>发送邮件

#import @interface ThirdViewController : UIViewController//发送问题报告 email-(IBAction)sendQuestion:(id)sender{ MFMailComposeViewController * mailViewController =[[MFMailComposeViewController allo

2013-12-13 09:34:30 1258

原创 本地推送

viewController中-(void)openNotification{ if (ctm == 0) { return; } UILocalNotification *notification=[[UILocalNotification alloc] init]; if (notification!=nil) {

2013-12-13 09:23:59 867

原创 应用启动三次弹出评论框

#pragma mark - 启动三次弹出评论框-(void)getDeviceRunTime{ NSArray * paths =NSSearchPathForDirectoriesInDomains(NSDocumentationDirectory, NSUserDomainMask, YES); NSString *path =[paths objectAtIndex:0

2013-12-13 09:19:11 890

原创 关于导航条navigationBar消失的问题

- (void)viewDidLoad{ [super viewDidLoad]; UIBarButtonItem * backButton=[[UIBarButtonItem alloc]init]; backButton.title=@"戻る"; self.navigationItem.backBarButtonItem=backButton;

2013-12-10 14:48:08 2413

转载 IOS 程序员开发最常用宏定义

1.首次启动判断: #define First_Launched @"firstLaunch"2.ios7系统判断: #define IsIOS7 ([[[UIDevice currentDevice] systemVersion] floatValue] >=7.0 ? YES : NO)3.判断是否Retina屏、是否IPhone5、是否IPad#define is

2013-12-07 18:45:35 890

转载 应用程序间通信 openURL:用法总结

转自  http://www.cocoachina.com/bbs/read.php?tid=58388尽管iPhone不允许同时运行两个应用程序,我们可以从自己的应用程序中启动另一个应用程序,并且可以在应用程序之间共享数据。我们可以使用UIApplication类的openURL:方法从一个应用程序来启动另一个应用程序。例如,要在Safari应用程序中打开Google主页,我

2013-12-07 14:40:09 765

转载 WebView调用Javascript方法

正文:1.       Objective-C调用Javascript方法:前提:UIWebView已经完全加载完成包含需要调用的页面方法:假设某视图对象的子视图属性self.webview加载的页面包含如下Javascript函数:function getString(){ return “Hello javascript!”;}并且该函数在该页面上可被正常调用,则可

2013-12-06 22:35:54 1448

转载 收集ios开源框架

转:http://blog.csdn.net/complex_ok/article/details/7163736MBProgressHUD —— 进度指示一种优雅的,半透明的进度显示效果。同时还提供了其他附加功能,比如显示完成信息并淡出。iCarousel  —— 效果很酷的分页排列内容类似的页面需要并排列出来,供用户选择。iCarousel具有非常酷

2013-12-06 22:01:36 794

转载 UIWebView加载本地HTML文件

作者: xuguoxing 分类: IOS, UIKit, UIWebView 发布时间: 2012-09-24 17:19 ė 62条评论一.准备HTML文件及其资源文件使用UIWebView加载本地的HTML文件 index.html,在index.html中引用了本地的图片、CSS文件、JS文件以及外部的图片。index.html内容如下

2013-12-06 21:50:48 4518

转载 ios开发scrollView中contentSize、contentInset和contentOffset区别

contentSize是scrollview可以滚动的区域,比如frame = (0 ,0 ,320 ,480) contentSize = (320 ,960),代表你的scrollview可以上下滚动,滚动区域为frame大小的两倍。 contentOffset是scrollview当前显示区域顶点相对于frame顶点的偏移量,比如上个例子你拉到最下面,contentoffset就是(

2013-12-06 14:40:04 1237

转载 静态库制作

新建一个项目     file -->  new --> project -->  Framework & Library ---> Cocoa Touch Static Library然后加入你需要封装的文件   Edit Sheme --> 选择 Release ---> OK  选择 IOS Device   然后 Product --> Build

2013-12-05 23:14:24 738

转载 如何获取设备唯一标识

WWDC 2013已经闭幕,IOS7 Beta随即发布,界面之难看无以言表...,简直就是山寨Android。更让IOS程序猿悲催的是,设备唯一标识的MAC Address在IOS7中也失效了。IOS系统中,获取设备唯一标识的方法有很多:一.UDID(Unique Device Identifier) UDID的全称是Unique Device Identifier

2013-12-05 23:11:35 3020

转载 iOS- 使用正则表达式NSRegularExpression 来验证textfiled输入的内容

iphone 4.0以后就开始支持正则表达式的使用了,在ios4.0中正则表达式的使用是使用NSRegularExpression类来调用。 1. 下面一个简单的使用正则表达式的一个例子:NSRegularExpression 类-(void)parseString{//组装一个字符串,需要把里面的网址解析出来NSString *urlString=@"sf

2013-12-05 16:04:01 672

原创 正则表达式(慢慢整理)

1.判断输入框的内容是否是数字-(BOOL)isNumText:(NSString *)str{ NSString * regex = @"(/^[0-9]*$/)"; NSPredicate * pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex]; BOOL isMatch = [pr

2013-12-05 14:04:19 561

原创 NSDate相关

//获得当前日期 NSDate *now = [NSDate date]; NSCalendar *cal = [NSCalendar currentCalendar]; unsigned int unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NS

2013-12-05 11:22:12 685

原创 简单定时器Demo

#import @interface LYViewController : UIViewController{ IBOutlet UILabel *timeLabel; NSTimer *timer; IBOutlet UITableView * tableView; IBOutlet UIButton *startAndEnd; int m

2013-12-04 18:30:19 678

原创 UIScrollView的简单使用

#import @interface ScrollView : UIViewController{ NSMutableArray * imageArray; NSTimer *timer; int pageNum;}@property (nonatomic,strong)UIScrollView *myScrollView;@property (nonatomi

2013-12-04 18:24:56 791

原创 MediaPlayer简单使用

#import #import @interface MediaPlayerController: UIViewController{ AVPlayerLayer *videoPlayerLayer; AVPlayer *player; NSTimer *timer;}@property(nonatomic, retain) AVPlayerLayer *videoP

2013-12-04 18:22:53 922

原创 navigationItem

-(void)configNavBar{ [self.navigationItem setTitle:@"IPO申込み管理"]; UIImage * titleBg =[UIImage imageNamed:@"titlebar.png"];// self.navigationController.navigationBar.tintColor =[UIColor col

2013-12-02 12:02:54 736

遮罩镂空效果实现

Layer镂空的效果实现,支持任意镂空形状。通过对CAShapeLayer的UserEvenOddFillRules的用法实践

2018-08-02

自定义TabBar

自定义tabbar实现的界面可以自定义,效果更好

2013-09-28

自定义AlertView

自定义AlertView实现弹出评论框,只要是要弹出的视图的效果都可以通过自定义alertView来实现,这个例子比较简单,利于初学者

2013-09-28

空空如也

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

TA关注的人

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