• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
hiei03301
博客园    首页    新随笔    联系   管理    订阅  订阅
1 2 下一页
2016年8月9日
报错:Failed to instantiate the default view controller for UIMainStoryboardFile 'MainStoryboard' - perhaps the designated entry point is not set?
摘要: 原因分析:在StoryBoard中没有一个view controller设置了Initial Scene。 解决方案:在Storyboard中,选择一个view conroller作为story board的第一启动界面 阅读全文
posted @ 2016-08-09 15:44 hiei03301 阅读(112) 评论(0) 推荐(0)
NSAttributedString字符串属性类
摘要: 1 //定义一个可变字符串属性对象aStr 2 NSMutableAttributedString *aStr = [[NSMutableAttributedString alloc]initWithString:str]; 3 //定义一个字典类对象dic存储设置的属性值,这里设置字体为粗体 4 NSDictionary *dic = @{NSFontAttributeNam... 阅读全文
posted @ 2016-08-09 15:43 hiei03301 阅读(119) 评论(0) 推荐(0)
删除默认故事版中的视图控制器所要做的设置
摘要: 如果将故事版中默认的View Controller删除,重新从对象库中拖拽一个View Controller需要做以下操作 1)重新指定这个View Controller的底层类为ViewController,新拖拽后默认是UIViewController 2)勾选Is Initial View C 阅读全文
posted @ 2016-08-09 15:23 hiei03301 阅读(160) 评论(0) 推荐(0)
TextField文本框
摘要: 1)失去第一响应者状态方法(即关闭键盘) 要先将视图view的底层类设置为UIControl类 再设置view的touch down事件,在事件中写入以下方法 [self.textField resignFirstResponder]; 2)更改键盘Return键使其显示为Done 选中TextFi 阅读全文
posted @ 2016-08-09 15:16 hiei03301 阅读(174) 评论(0) 推荐(0)
Slider滑动条
摘要: Slider的Value Changed事件一般与Label结合让其显示数值 int mySlider = (int)sender.value; self.sliderLabel.text = [NSString stringWithFormat:@”%d”,mySlider]; 阅读全文
posted @ 2016-08-09 15:15 hiei03301 阅读(175) 评论(0) 推荐(0)
UIAlertController警告视图和操作表单
摘要: 1 //创建一个myAlert1操作表单对象(UIAlertControllerStyleActionSheet为操作表单,UIAlertControllerStyleAlert为警告视图) 2 UIAlertController *myAlert1 = [UIAlertController alertControllerWithTitle:@"Are you sure?" messa... 阅读全文
posted @ 2016-08-09 15:13 hiei03301 阅读(188) 评论(0) 推荐(0)
UIPickerView滚轮选择器视图
摘要: 1 //必须实现两个协议 2 //数据源协议必须实现的两个方法 3 //选取器的输出借口singlePicker,并在故事版中选择该选取器将dataSource和delegate拖入视图控制器与之关联 4 //@property (weak, nonatomic) IBOutlet UIPickerView *singlePicker; 5 //characterNames是自己定义... 阅读全文
posted @ 2016-08-09 15:12 hiei03301 阅读(318) 评论(0) 推荐(0)
UIDatePicker日期选取器
摘要: 1 //定义显示日期的格式 2 NSDateFormatter *dateFormat = [[NSDateFormatter alloc]init]; 3 //NSDateFormatterMediumStyle的显示格式为: Nov 23, 1937” or “3:30:32 PM 4 dateFormat.dateStyle = NSDateFormatterMediumStyl... 阅读全文
posted @ 2016-08-09 15:10 hiei03301 阅读(246) 评论(0) 推荐(0)
2016年3月8日
objective-c第七章课后练习3
摘要: 题:Fraction类对负分数适用吗?例如:1/4-1/2 能否显示成-1/4? 1 //--------类定义实现参考上篇随笔,此处需更改print方法和main主方法部分---------- 2 - (void) print: (BOOL) yesOrNo//打印 3 { 4 if (yesOr 阅读全文
posted @ 2016-03-08 15:05 hiei03301 阅读(140) 评论(0) 推荐(0)
2016年3月7日
objective-c第七章课后练习2
摘要: 题:改变第七章例子中print方法,增加bool参数,判断如果是YES则对分数进行约简 1 @interface Fraction : NSObject 2 { 3 //int num,den; 4 5 } 6 @property int num,den;//定义属性 7 8 - (void) pr 阅读全文
posted @ 2016-03-07 22:39 hiei03301 阅读(133) 评论(0) 推荐(0)
1 2 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3