黑马入门教程笔记00-iOS开发初体验

iOS开发体验:

http://www.imooc.com/video/4698

学习OC前请务必先学习C


问:main函数?

答:main函数的参数列表保存了输入参数的信息,第一个参数argc记录了输入参数的个数,第二个参数是字符串数组的,字符串数组的每个单元是char*类型的,指向一个c风格字符串。argv就是输入的运行程序.


1、模拟器快捷键

command +shift + H 等同于Home

command + 1 大屏幕

command + 2 中屏幕

command + 3 小屏幕


2、弹出提醒对话框

- (IBAction)btn_clik:(id)sender {
//    NSLog(@"hello eric");
    //定义一个对话框
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"第一次" message:@"我滴错一次" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];
    //显示对话框
    [alert show];
}


3、拨打电话和发送短信

- (IBAction)callToGod:(id)sender {
    //1.设定电话号码
    NSURL *url = [NSURL URLWithString:@"tel://10010"];
    //2.调用iOS系统拨号功能
    [[UIApplication sharedApplication] openURL:url];
}

- (IBAction)textToGod:(id)sender {
    //1.设定接收短信的人
    NSURL *url = [NSURL URLWithString:@"sms://10086"];
    //2.填写短信内容
    [[UIApplication sharedApplication] openURL:url];
}



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值