12 2014 档案
iOS 获取手机信息
摘要:待续; 阅读全文
posted @ 2014-12-30 18:46 ทดสอบ
NSBundle 的使用
摘要:NSBundle 读取图片 plist text NSBundle *mainbundle=[NSBundle mainBundle]; //使mainBundle 对象获取图片的路径 NSString *imagePath=[mainbundle pathForResource:... 阅读全文
posted @ 2014-12-30 18:06 ทดสอบ
iOS NSFileManager 文件管理 转
摘要:博客连接一 在document文件夹下 -----》文件夹和文件的创建1.获取到文件夹的路径;2.创建一个NSFileManager 对象;3.通过NSFileManager 对象的 createDirectoryAtPath方法来创建文件夹;-(void)createDirectory{ /... 阅读全文
posted @ 2014-12-30 17:13 ทดสอบ 阅读(138) 评论(0) 推荐(0)
iOS 国际化
摘要:1.在APPproject的新建一个Localizable.stringsFile->new file--->Resource --->strings File2.添加需要的语言文件 如InfoPlist.strings(English) InfoPlist.strings(Simplified).... 阅读全文
posted @ 2014-12-30 17:12 ทดสอบ
ios 本地通知 UInotification
摘要:一,创建一个本地通知,很简单;1.创建一个UInotification对象;2.设置 UInotification对象的属性;3.注册UInotification对象;//创建UInotification对象 noti; UILocalNotification *noti=[[UILocalN... 阅读全文
posted @ 2014-12-30 12:54 ทดสอบ 阅读(213) 评论(0) 推荐(0)
iOS iOS7 20px 处理
摘要:- (void)viewWillAppear:(BOOL)animated{ // View defaults to full size. If you want to customize the view's size, or its subviews (e.g. webView), ... 阅读全文
posted @ 2014-12-29 19:34 ทดสอบ 阅读(174) 评论(0) 推荐(0)
cordova 开发属于自己的插件---ios
摘要:上次开发了属于自己的Android cordova 插件;现在开发属于自己的iOS cordova 插件;首先需要新建一些文件夹和文件,具体如图:1.新建iOSalert 文件夹;在IOSalert 文件夹下新建src、www 文件夹和plugin.xml文件;而在src文件夹下新建iOS文件夹,又... 阅读全文
posted @ 2014-12-25 19:52 ทดสอบ 阅读(408) 评论(0) 推荐(0)
ios TabBarController
摘要:新建一个空的project;1.选择File — New — New File,在弹出的窗口,左边选择Cocoa Touch,右边选择UIViewController subclass,之后选Next,在弹出的窗口中,输入名称BlueViewController,并选中With xib,如下图2.创... 阅读全文
posted @ 2014-12-24 19:21 ทดสอบ 阅读(157) 评论(0) 推荐(0)
ios UIpickerView 监听选择事件;
摘要:1.在main.storyboard 或者viewcontroller.xib 拖出一个UIPickerView 控件和button 控件;如图2.1 选中Picker View控件,2 打开Connections Inspector,3 4 找到delegate和datasource,从它们右边的... 阅读全文
posted @ 2014-12-24 18:10 ทดสอบ 阅读(673) 评论(0) 推荐(0)
iOS UIactionsheet 监听按钮点击事件
摘要:1.在当前的视图头文件添加协议UIActionSheetDelegate如:@interface DebbieViewController : UIViewController2.在当前的视图的DebbieViewController.m文件中实现协议的方法;-(void)actionSheet:(... 阅读全文
posted @ 2014-12-24 16:04 ทดสอบ 阅读(355) 评论(0) 推荐(0)
ios UIalertView 监听按钮点击事件
摘要:1.在当前的视图中控制器中的头文件DebbieViewController.h 中添加UIalertView 的委托;让当前的View代理UIalertView的监听按钮点击事件;2.在当前的视图中控制器的DebbieViewController.m中实现UIalertview的委托方法;-(voi... 阅读全文
posted @ 2014-12-24 15:46 ทดสอบ 阅读(350) 评论(0) 推荐(0)
iOS 导航栏
摘要://创建一个导航栏 UINavigationBar *navigationBar=[[UINavigationBar alloc] initWithFrame:CGRectMake(0, 0, 320, 44)]; //创建一个导航栏集合 UINavigationItem ... 阅读全文
posted @ 2014-12-24 11:21 ทดสอบ 阅读(174) 评论(0) 推荐(0)
android Tab =viewpager+fragmnet
摘要:1.定义几个fragment 的subclass 如fragmentone,fragmenttwo;public class fragmentthree extends Fragment { private View view; /** * */ @Override... 阅读全文
posted @ 2014-12-18 15:58 ทดสอบ 阅读(349) 评论(0) 推荐(0)
Android fragment 想activity 传送数据
摘要:fragment可以通过定义 fragment的接口的方法来 想activity传送数据;而activity则是通过实现 fragment的接口来接收fragment的送来的数据;1.在fragment 的subclass 中定义一个接口 如OnInterfaceOfFragmentone 接口;在... 阅读全文
posted @ 2014-12-18 15:25 ทดสอบ 阅读(228) 评论(0) 推荐(0)
android fragment
摘要:getActivity() 方法 获取到当前的activitygetFragmentManager() 方法 获取到fragment管理器;对应的是android.app.Fragment 支持Android4.0以上getSupportFragmentManager() 对应的是import an... 阅读全文
posted @ 2014-12-10 15:18 ทดสอบ 阅读(155) 评论(0) 推荐(0)