自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(27)
  • 收藏
  • 关注

转载 iOS面试题整理(一)

代码规范 这是一个重点考察项,曾经在微博上发过一个风格纠错题: 也曾在面试时让人当场改过,槽点不少,能够有 10 处以上修改的就基本达到标准了(处女座的人在这方面表现都很优秀 一个区分度很大的面试题 考察一个面试者基础咋样,基本上问一个 @property 就够了: @property 后面可以有哪些修饰符? 什么情况使用 weak 关键字,相比 assign 有什么...

2015-11-26 16:42:00 132

转载 app发布流程详解

https://developer.apple.com 1. 点击 Member Center 2. 创建应用ID 3. 创建项目 4. 在AppStore创建对应的应用 5. 创建授权文件 6. 配置授权文件 7. 打包项目 ...

2015-11-25 22:42:00 91

转载 App Store审核指南(中文版)2010版

前言   感谢您付出宝贵的才华与时间来开发iOS应用程程序。从职业与报酬的角度而言,这对于成千上万的开发员来说一直都是一项值得投入的事业。我们希望帮助您加入这个成功的组织。这是我们首次发布《应用程序商店评估指导》(App Store Review Guidelines)。通过它,我们希望帮助您解决开发应用程序时遇到的问题,以便于您在提交应用程序时,可以加快审批流程的速度。   我们将...

2015-11-25 22:33:00 135

转载 GCD详解

简介: GCD(全称Grand CentralDispatch) 纯C语言 GCD优势: 1.为多核运算提供 2.自动管理线程的生命周期(创建线程、调度任务、销毁线程、),相比NSTread需要手动管理线程和生命周期更方便 3.只需要告诉GCD想要执行什么任务,不需要编写任何线程管理代码 GCD中有两个核心概念: 任务和队列 1.任务: 执行...

2015-11-25 15:05:00 1560

转载 iOS扫描二维码(系统方法)

步骤如下: 1.导入AVFoundation框架,引入<AVFoundation/AVFoundation.h> 2.设置一个用于显示扫描的view 3.实例化AVCaptureSession、AVCaptureVideoPreviewLayer @property (weak, nonatomic) IBOutlet UIView *viewPre...

2015-11-25 13:48:00 110

转载 CoreLocation+MapKit系统定位(含坐标以及详细地址)

iOS8 之后出现一些新的配置 [self.manager requestWhenInUseAuthorization]; 并且在info.plist文件中增加 NSLocationWhenInUseUsageDescription BOOL YES NSLocationAlwaysUsageDescription string “提示描述”记得加依赖...

2015-11-24 17:04:00 131

转载 UIToolbar+UIWebView 浏览器

创建界面 var webView : UIWebView! var toolBar : UIToolbar! let swiftWH = UIScreen.mainScreen().bounds.size webView = UIWebView(frame: CGRectMake(0, 20, swiftWH.width, swiftWH.height-49-20)) w...

2015-11-24 10:16:00 55

转载 UIWebView(本地数据部分)

创建UIWebView和UISegmentedControl webView用于显示内容,segmentedControl用于切换读取内容的类型 为了方便起见 用拖拉控件形式布局完界面 /* 使用UIWebView加载本地数据或资源有如下三种方式: 1,使用loadHTMLString方法加载HTML内容 2,使用loadRequest方法加载本地资源(也可用于加载服务器...

2015-11-24 10:06:00 41

转载 UIToolbar

创建ToolBar let toolBar = UIToolbar(frame: CGRectMake(0, 20, 380, 44)) self.view.addSubview(toolBar) 添加控件 let btn1 = UIBarButtonItem(barButtonSystemItem: .Cancel, target: nil, action: ...

2015-11-24 09:42:00 54

转载 UIDatePicker

创建DataPicker //创建DatePicker datePicker = UIDatePicker(frame: CGRectMake(0, 50, 380, 200)) //将日期选择器区域设置为中文,则选择器日期显示为中文 datePicker.locale = NSLocale(localeIdentifier: "zh_CN") datePicker.add...

2015-11-24 09:29:00 54

转载 通讯录开发

开发目标:本次需求仅仅只需读取通讯录信息 - (void)loadPerson { ABAddressBookRef addressBookRef = ABAddressBookCreateWithOptions(NULL, NULL); if (ABAddressBookGetAuthorizationStatus() == kABAuthori...

2015-11-23 10:59:00 58

转载 UIGestureRecognizer手势

常用手势: 滑动,轻点,捏合,旋转,拖拽,长按 1.滑动(快速滑动) let swipeUp = UISwipeGestureRecognizer(target: self, action: Selector("swipe:")) swipeUp.direction = UISwipeGestureRecognizerDirection.Up self.view.addGes...

2015-11-19 14:29:00 57

转载 UIScrollView

创建scrollview scrollView = UIScrollView() scrollView.delegate = self scrollView.frame = self.view.bounds let imageView = UIImageView(image: UIImage(named: "0")) scrollView.contentSize = ima...

2015-11-19 13:57:00 44

转载 UIStepper

创建并设置相关属性 var stepper : UIStepper!//微调器 var label : UILabel! stepper = UIStepper() stepper.frame = CGRectMake(50, 200, 280, 50) stepper.minimumValue = 0//最小值 stepper.maximumValue = 10...

2015-11-19 11:56:00 56

转载 UIPickerView

//遵守协议时需要把必须遵守的协议都实现了否则报红 UIPickerViewDelegate,UIPickerViewDataSource 创建PickerView pickerView = UIPickerView() pickerView.delegate = self pickerView.dataSource = self pickerView.selectRow...

2015-11-19 11:44:00 56

转载 UIAlertController

自iOS8起,苹果就建议告警框使用UIAlertController来代替UIAlertView 在ViewDidLoad中加载时报错 whose view is not in the window hierarchy! 视图没创建出来之前是不能弹出来的 解决办法,延长时间加载 1.一般的提示框 func normalController(){ let alert...

2015-11-19 11:30:00 71

转载 UIActionSheet

introduced=2.0, deprecated=8.3 早已废弃 还是拥抱 UIAlertController 吧 创建UIActionSheet let actionSheel = UIActionSheet() actionSheel.addButtonWithTitle("取消") actionSheel.addButtonWithTitle("选项一") ac...

2015-11-19 11:21:00 56

转载 UIAlertView

introduced=2.0, deprecated=9.0 ios9已经废弃 建议使用UIAlertController 创建AlertView let alertView = UIAlertView() alertView.title = "温馨提示" alertView.message = "UIAlertView已经废弃,不要再执着了" alertView.add...

2015-11-19 11:13:00 58

转载 UISlider

创建UISlider let slider = UISlider(frame: CGRectMake(50, 100, 280, 50)) slider.backgroundColor = UIColor.clearColor() slider.minimumValue = 0//最小值 slider.maximumValue = 1//最大值 slider.value =...

2015-11-19 11:04:00 32

转载 UIProgressView

创建UIProgressView let progressView = UIProgressView(progressViewStyle:.Default) progressView.frame = CGRectMake(20, 100, 300, 0) self.view.addSubview(progressView) 设置属性 progressView.t...

2015-11-19 10:54:00 57

转载 UISegmentedControl

创建UISegmentedControl let items = ["选项一","选项二","选项三"] let segmented = UISegmentedControl(items: items) segmented.frame = CGRectMake(40, 20, 300, 35) self.view.addSubview 设置 segmented...

2015-11-19 10:52:00 39

转载 UISwitch

创建Switch let mySwitch = UISwitch(frame: CGRectMake(100,100,0,0)) mySwitch.tag = 101 self.view.addSubview(mySwitch) 开关与事件 mySwitch.on = false mySwitch.addTarget(self, action: Selecto...

2015-11-19 10:48:00 39

转载 UITextView

创建TextView let textView = UITextView(frame: CGRectMake(50, 100, 280, 50)) self.view.addSubview(textView) 设置边框 textView.layer.borderWidth = 1//边框宽度 textView.l 常用属性 textView.ed...

2015-11-19 10:23:00 37

转载 UITextField

创建TextFielf let textField : UITextField = UITextField(frame: CGRectMake(50, 100, 280, 50)) self.view.addSubview(textField) 设置属性 textField.borderStyle = UITextBorderStyle.RoundedRect//...

2015-11-19 10:18:00 51

转载 UIImageView

创建ImageView let imageView = UIImageView(frame: CGRectMake(10, 100, self.view.frame.size.width-20, 400)) imageView.backgroundColor = UIColor.orangeColor() imageView.tag = 101 imageView.image...

2015-11-19 10:00:00 42

转载 Button

创建Button let button = UIButton(type: .Custom) button.frame = CGRectMake(100, 100, 100, 100) button.backgroundColor = UIColor.orangeColor() button.titleLabel?...

2015-11-19 09:50:00 53

转载 UILabel

创建Label      let rect = CGRectMake(10, 100, 320, 100)      let label : UILabel = UILabel (frame: rect)      self.view.addSubview(label) Label常用属性 label.backgroundColor = UICo...

2015-11-19 09:27:00 47

空空如也

空空如也

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

TA关注的人

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