- 博客(5)
- 收藏
- 关注
原创 ip的检查
<br />在ipone开发中没有找到限制输入ip的控件,直接用UITextField,但要对输入的ip进行检查,下面是检查ip的代码:<br />- (BOOL) checkip:(NSString*)ip{<br /> NSString *list = ip;<br /> NSArray *listItems = [list componentsSeparatedByString:@"."];<br /> unsigned count = [listItems count];<br /> if (cou
2011-05-10 20:43:00
474
原创 用UIAlertView绘制弹出对话框
<br /> 如果想使用UIAlertView定制自己的对话框,要添加系统回调函数- (void)willPresentAlertView:(UIAlertView *)alertView,并在这个函数中加入自己想要的内容,代码如下:<br /> <br />- (void)viewDidLoad{<br /> myalertView = [[UIAlertView alloc]initWithTitle:@"配置ip" <br /> message:@"" <br />
2011-05-08 17:22:00
1131
1
原创 按钮
<br /> 按钮UIButton的基本用法:<br /> <br /> <br />- (void)viewDidLoad {<br /> [super viewDidLoad];<br /> //绘制view<br /> backgroundview = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 320, 480)];<br /> [backgroundview setBackgroundColor:[UIColor darkGrayColor]
2011-05-08 17:15:00
367
原创 获取ipone硬盘信息
<br /> 试用statfs获取硬盘的信息,代码如下:<br /> <br /><br />static const unsigned long long G = 1024*1024*1024ull; //用GB为单位时的单位G的大小<br />static const unsigned long long M = 1024*1024; //用MB为单位时的单位M的大小<br />static const unsigned long long K = 1024; //用KB为单位时的单位K的大小*
2011-05-08 17:08:00
383
原创 UIWebView的用法
<br /> 刚换工作到南京,这边不是很熟悉,周末也没事,打算写点东西。<br /> 应聘时讲是过来做C开发,做底层驱动的,结果公司现在没这方面的项目,让我们去做苹果的应用软件开发,object-c一点都不知道,都得重头开始,也不知道算不算逼良为娼,下面我把我用到的几个控件整理一下,希望通过总结能加深印象,如果能对刚学的人有帮助那更好,只是我也是刚学,如果有错误敬请指正。<br /> <br /> 1、网页:UIWebView<br /> UIWebView有三种加载方式,这个很容易查,我
2011-05-08 17:03:00
927
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅