偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

一款模仿 iOS8 的iMessage的圖片選擇器

移動(dòng)開(kāi)發(fā)
這個(gè)demo是一款模仿iOS8的iMessage的圖片選擇器。在選項(xiàng)列表視圖中可以滾動(dòng)顯示待選圖片。

支持平臺(tái):iOS

運(yùn)行環(huán)境:iOS

開(kāi)發(fā)語(yǔ)言:swift

開(kāi)發(fā)工具:Xcode

源碼大小:61.43KB

源碼簡(jiǎn)介

這個(gè)demo是一款模仿iOS8的iMessage的圖片選擇器。在選項(xiàng)列表視圖中可以滾動(dòng)顯示待選圖片。

源碼運(yùn)行截圖

 

源碼片段

    override func viewDidLoad() { 

            super.viewDidLoad() 

              

            let tapRecognizer = UITapGestureRecognizer(target: self, action: "presentImagePickerSheet:"

            self.view.addGestureRecognizer(tapRecognizer) 

        } 

          

        // MARK: Other Methods 

          

        func presentImagePickerSheet(gestureRecognizer: UITapGestureRecognizer) { 

            let authorization = PHPhotopbrary.authorizationStatus() 

              

            if authorization == .NotDetermined { 

                PHPhotopbrary.requestAuthorization({ (status) -> Void in 

                    dispatch_async(dispatch_get_main_queue(), { () -> Void in 

                        self.presentImagePickerSheet(gestureRecognizer) 

                    }) 

                }) 

                  

                return 

            } 

              

            if authorization == .Authorized { 

                var sheet = BRNImagePickerSheet() 

                sheet.numberOfButtons = 3 

                sheet.delegate = self 

                sheet.showInView(self.view) 

            } 

            else { 

                let alertView = UIAlertView(title: NSLocapzedString("An error occurred", comment: "An error occurred"), message: NSLocapzedString("BRNImagePickerSheet needs access to the camera roll", comment: "BRNImagePickerSheet needs access to the camera roll"), delegate: nil, cancelButtonTitle: NSLocapzedString("OK", comment: "OK")) 

                alertView.show() 

            } 

        } 

源碼下載地址:http://down.51cto.com/data/1968726

責(zé)任編輯:閆佳明 來(lái)源: 網(wǎng)絡(luò)整理
相關(guān)推薦

2010-08-18 11:26:56

CISCO路由器

2009-04-27 10:50:03

思科路由器選購(gòu)

2011-01-11 10:29:46

2009-05-11 15:12:03

網(wǎng)管軟件產(chǎn)品摩卡軟件

2014-08-29 15:34:27

Web安全

2009-11-30 16:59:49

2012-04-16 14:32:31

iOS選擇器代碼

2010-08-13 14:25:29

思科路由器

2023-07-03 08:25:54

2024-03-27 08:41:09

Vue3Web應(yīng)用emoji表情選擇器

2011-09-08 17:31:29

Steply社交圖片

2010-12-01 12:50:59

2020-08-07 13:44:30

殺毒軟件方案

2011-04-21 09:29:27

家用打印機(jī)

2009-07-16 14:50:57

IT管理網(wǎng)管軟件摩卡

2016-08-02 09:53:05

云計(jì)算

2010-10-22 09:25:38

服務(wù)器虛擬化

2011-04-29 10:45:39

投影幕

2022-02-28 08:19:25

圖片預(yù)覽動(dòng)畫前端

2011-08-30 09:48:07

Ubuntu
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)