HeadFirst iPhone and iPad Development

对应WinFrom 或者 MFC 或者 C#
1. Model->Delegate->Controller(IBAction,IBOutlet….等)->Delegate->View(Storyboard)
2. Model(UIXXXXDataSource+UIXXXXDelegate) Interface
3. IB Action IB Outlet 事件
4. FirstResponder, resign 辞职 焦点
5. 第四章P165 如何使用plist作为数据库,使用NSCoding 序列化,NSArray,NSDictionary都实现了该协议 XML序列化
6. 导航栏,视图栈,navigationController.pushView
7. iOS也有模式对话框的概念 模式对话框
8. NSNotificationCenter Message Queue
9. NSSortDescriptor 排序接口
10. Core Data LINQ DataSet
以下CoreData内容太古老 iOS4,简单了解一下结构
11. NSFetch:查找 NSManageObject:实体
12. NSPersistentContainer CoreData 栈
13. 数据迁移:Add Model Version菜单
14. NSFetch LINQ SQL
15. 照相机/Alert

class ViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate {
    @IBOutlet weak var imageView: UIImageView!

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    @IBAction func pickImage(_ sender: Any) {
        let action = UIAlertController(title: "赶紧选", message: nil, preferredStyle: UIAlertControllerStyle.actionSheet);
        let cameraAction = UIAlertAction(
            title: "照相机呗!",
            style: UIAlertActionStyle.default) { (action) in
                let picker = UIImagePickerController();
                picker.sourceType = UIImagePickerControllerSourceType.camera;
                picker.delegate = self;
                picker.allowsEditing = true;
                self.present(picker, animated: true, completion: nil);
        }
        let cancelAction = UIAlertAction(
            title: "Cancel",
            style: UIAlertActionStyle.default) { (action) in
                // ...
        }

        action.addAction(cameraAction);
        action.addAction(cancelAction);
        self.present(action, animated: true, completion: nil);
    }


    func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
        self.dismiss(animated: true, completion: nil);
    }

    func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
        imageView.image = info[UIImagePickerControllerEditedImage] as! UIImage?;
        self.dismiss(animated: true, completion: nil);
    }
}


16.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
A Learner’s Guide to Creating Objective-C Applications for the iPhone and iPad Book Description : Let’s say you have a killer app idea for iPhone and iPad. Where do you begin? Head First iPhone and iPad Development will help you get your first application up and running in no time. You’ll not only learn how to design for Apple’s devices, you’ll also master the iPhone SDK tools – including Xcode and Objective-C programming principles to make your app stand out. Whether you’re a seasoned Mac developer who wants to jump into the App store, or someone with strong object-oriented programming skills but no Mac experience, this book is a complete learning experience for creating eye-catching, top-selling iPhone and iPad applications. Install the iPhone OS SDK and get started using XCode Put Objective-C core concepts to work, including message passing, protocols, properties, and memory management Take advantage of iPhone OS patterns such as datasources and delegates Preview your applications in the Simulator Build more complicated interactions that utilize multiple views, data entry/editing, and rotation Work with the iPhone’s camera, GPS, and accelerometer Optimize, test, and distribute your application We think your time is too valuable to waste struggling with new concepts. Using the latest research in cognitive science and learning theory to craft a multi-sensory learning experience, Head First iPhone and iPad Development has a visually rich format designed for the way your brain works, not a text-heavy approach that puts you to sleep. eBook Details : Head First iPhone and iPad Development Written by: Dan Pilone, Tracey Pilone Published by: O'Reilly Media Date Published: 02/15/2014 Edition: 3rd Edition ISBN: 978-1-44931-657-0 Available in: EBook Pages: 368 Language: English File format: PDF 因为上传权限问题。压缩了下,压缩包60m
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值