End Photo Browser app iOS source

Source: Internet
Author: User
<span id="Label3"></p><p><p></p></p> <table cellspacing="0" cellpadding="0"> <tbody> <tr> <td id="postmessage_47498" class="t_f"><p><p><br><br>Development Environment: Swift 1.2. Xcode 6.3<br><br><br>(i) General Description 1. This framework has the OC version, this time is mainly to draw the OC version of all bugs and deficiencies, while listening to the feedback and voice of a large number of users, repair and greatly improved the previous OC version and on this basis carefully launched the Swift perfect version,<span>https:// Github.com/nsdictionary/corephotobrowservc. </span><br><span>2. Pure Swift support, local and network support, landscape support, iphone all screen support, ipad tablet support and strive for 0 bugs.</span><br>3. Dependency Framework description: cfsnapkit (layout library), haneke (picture cache library), Nvactivityindicatorview (load view)<br>4. This document will be more interesting, is the image of the features to tell, please carefully review the picture description text, use is also embedded in these picture Description.<br>5. This framework is basically in my journey to Ruoergai prairie on the way to complete the bus, so there are a lot of Ruoergai scenery!<br>6. Pod is not supported.<br><br><br></p></p>SOURCE Download: http://code.662p.com/view/11493.html<p><br>Fast Integration<br>1. Add library drag and drop Photobrowser folder to your project, drag and drop the dependent library in frameworks into your project.<br><br>2. Display albums: local albums and Web albums<br>2.1 Show local album/** local album */func showlocal (index:int) {<br>Let PBVC = Photobrowser ()/** Set album presentation style */pbvc.showtype = showtype/** Set Album type */pbvc.phototype = Photobrowser.phototype.l Ocal//force off Show All information Pbvc.hidemsgforzoomanddismisswithsingletap = Truevar models: [photobrowser.photomodel] = []let title = Langtype = = langtype.chinese? Titlelocalch:titleenlet desc = Langtype = = langtype.chinese? Desclocalch:desclocalen//model data array for (var i=0, i<9; i++) {let model = Photobrowser.photomodel (localimg:uiimage (named : "\ (i+1). jpg")! , titlestr:title, descstr:desc, sourceView:displayView.subviews as! UIView) models.append (model)}/** Set Data */pbvc.photomodels = Modelspbvc.show (invc:self,index:index)}<br><br>2.2 Show Web albums/** Web Albums */func showhost (index:int) {<br>Let PBVC = Photobrowser ()/** Set album presentation style */pbvc.showtype = showtype/** Set Album type */pbvc.phototype = Photobrowser.phototype.h Ost//force off Show All information Pbvc.hidemsgforzoomanddismisswithsingletap = Truevar models: [photobrowser.photomodel] = []let titles = Langtype = = langtype.chinese? Titlehostch:titlehostenlet Descs = Langtype = = langtype.chinese? Deschostch:deschosten//model data array for (var i=0, i<9; i++) {let model = Photobrowser.photomodel (hosthdimgurl:hosthdimag eurls, hostthumbnailimg: (displayview.subviews as! uiimageview). image, titlestr:titles, descstr:descs, sourceView:displayView.subviews as! UIView) models.append (model)}/** Set Data */pbvc.photomodels = Modelspbvc.show (invc:self,index:index)}<br><br>The different points of local and Web albums are summarized as Follows:<br>1. Photo Browser Properties showtype: The local photo album is the enumeration value of locally, the network album is the enumeration value of host<br>2. Photo Browser's album model is the Photobrowser.photomodel type, and he has two initialization methods:<br>For local albums, Call the Initialize method Photobrowser.photomodel (localimg: ...,<br>Web Albums Call the Initialize Method Photobrowser.photomodel (hosthdimgurl: ... This method.<br><br>3. Function of the detailed (graphic use, please check carefully):<br>(1) The basic display can display the photo browser directly, and you can specify the page display. almost all of the photo browsers I've seen before have been added directly to the window, so the simplest but fatal flaw is that the photo browser on the window doesn't know after setting the Rotation. So I changed the traditional approach here. The photo browser initializes the incoming vc, please pass the current business controller, do not spread other such as NAVIGATIONVC,TABARVC Oh.</p><p><p><span><span style="color: #4078c0;"></span><br></span></p></p><br><strong><strong>(2) no navbar, no Tabbar</strong></strong><p><p><span>Photo Browser is hiding the status bar, the status bar under iOS7 is based on Cotroller management, but this is not convenient for me to operate, so you need to add a property in the Info.plist file: View controller-based status bar Appearance and set the value to No.<br><span style="color: #4078c0;"></span><br></span></p></p><br><strong><strong>(3) navbar, No Tabbar</strong></strong><p><p><span><span style="color: #4078c0;"></span><br></span></p></p><br><strong><strong>(4) no navbar, tabbar</strong></strong><p><p><span>In the case of tabbar, especially note: because the photo browser is added on the VC (can automatically rotate, and is reasonable in design), so your VC is best Full-screen layout, It is best not to use vc.edgesforextendedlayout, otherwise you may find that your photo browser is not Full-screen size.<br><span style="color: #4078c0;"></span><br></span></p></p><br><strong><strong>(5) There are navbar, tabbar</strong></strong><p><p><span><span style="color: #4078c0;"></span><br></span></p></p><br><strong><strong>(6) Push Mode</strong></strong><strong><strong>please directly set pbvc.showtype = PhotoBrowser.ShowType.Push<br></strong></strong><strong>the <strong>Push Mode interface has been customized to unify the interface<br></strong></strong><p><p><span><span style="color: #4078c0;"></span><br></span></p></p><br><strong><strong>(7) modal mode</strong></strong><strong><strong>please directly set pbvc.showtype = PhotoBrowser.ShowType.Modal<br></strong></strong><strong>the <strong>interface has been customized</strong></strong><p><p><span><span style="color: #4078c0;"></span><br></span></p></p><br><strong><strong>(8) Amplification model: imitation netease news, Classic OC version mode</strong></strong><strong><strong>please directly set pbvc.showtype = PhotoBrowser.ShowType.ZoomAndDismissWithCancelBtnClick<br></strong></strong><strong><strong>Imitation NetEase effect is: Click will not exit, but will toggle hidden or show details.<br></strong></strong><strong><strong>click: Show Details</strong></strong><strong><strong>click: Hide Details and enter full screen depth view mode, No Pagecontrol in this mode</strong></strong><p><p><span><span style="color: #4078c0;"></span><br></span></p></p><br><strong><strong>(9) magnification mode:, Sina Weibo zoom mode</strong></strong><strong><strong>everyone in the OC version feedback the desired feature, The classic OC version does not have this feature<br></strong></strong><strong><strong>please directly set pbvc.showtype = PhotoBrowser.ShowType.ZoomAndDismissWithSingleTap<br></strong></strong><strong><strong>The Imitation effect is: Click does not switch details, but exit directly.<br></strong></strong><strong><strong>note: The details display mode can be customized in this mode, which will be written below. </strong></strong><p><p><span><span style="color: #4078c0;"></span><br><br></span></p></p><strong><strong>(10) Horizontal screen function support: Everyone in the OC version feedback the desired function</strong></strong><strong><strong>The horizontal screen mode is compatible with the ipad and can be vertically vertical, vertical, horizontal, horizontal, horizontal, Vertical in. </strong></strong><strong><strong>in: refers to clicking the thumbnail image into the photo browser; out: refers to exiting the photo browser. </strong></strong><p><p><span><span style="color: #4078c0;"></span><br></span></p></p><br><strong><strong>(11) Picture Save</strong></strong><strong>the <strong>picture does the repeating save logic, but the next time you enter the photo browser again, you can save it again</strong> .</strong><strong>the <strong>OC Version does a rigorous copy-and-save process, but at a slightly higher cost. </strong></strong><strong><strong>note: I read, Weibo is the same, the next entry or can be repeated save, so do not tangle</strong></strong><p><p><span><span style="color: #4078c0;"></span><br></span></p></p><br><strong><strong>(12) Information Scrolling view: Everyone in the OC version feedback the desired function</strong></strong><strong><strong>Please note that the 2nd page of detailed text is too little to scroll, and the 1th page too much text, you can scroll</strong> up and down to view</strong><strong><strong>note: The text is too small to Scroll. Too much text can be scrolled directly, you can select Text. </strong></strong><p><p><span><span style="color: #4078c0;"></span><br></span></p></p><br><strong><strong>(13) Click mode: Detail Mode</strong></strong><strong><strong>with captions and detailed textual information</strong></strong><strong><strong>note: The default is to show details and this feature can be customized in the single exit mode, see the next example</strong></strong><p><p><span><span style="color: #4078c0;"></span><br></span></p></p><br><strong><strong>(14) Click mode: Remove Details mode, imitation</strong></strong><strong><strong>This is everyone in the OC version feedback desired function<br></strong></strong><strong>untitled <strong>and detailed text, but with Pagecontrol</strong></strong><p><p><span>Please set the following code, note that this function is only valid under Zoomanddismisswithsingletap</span></p></p><p><p><span>Force off Show All information Pbvc.hidemsgforzoomanddismisswithsingletap = True</span></p></p><p><p><span><span style="color: #4078c0;"></span><br></span></p></p><br><strong><strong>(15) thumbnail is not loaded successfully, large image is not loaded successfully</strong></strong><strong><strong>default use of dynamically generated black picture scaling</strong></strong><p><p><span>The picture cache framework in Swift Haneke currently does not support the download progress, so there is no progress on the picture download, and the other progress frame is only supported ios8. But I asked in Haneke's issue if I could get the progress, but the author hasn't replied to me Yet. If there is a progress feature, I will add a progress indicator as soon as Possible.<br><span style="color: #4078c0;"></span><br></span></p></p><br><strong><strong>(16) thumbnail loading success, large image not loaded successfully</strong></strong><strong><strong>thumbnail dynamic to the middle of the photo browser 120*120 thumbnail placeholder status</strong></strong><p><p><span><span style="color: #4078c0;"></span><br></span></p></p><br><strong><strong>(17) thumbnail loaded successfully, large image also loaded successfully</strong></strong><strong><strong>thumbnails zoom directly to the position placeholder status after the large HD figure calculation</strong></strong><p><p><span><span style="color: #4078c0;"></span><br></span></p></p><br><strong><strong>(18) thumbnail loading success, picture View Download success and animation</strong></strong><strong><strong>dynamic change from thumbnail placeholder to High-definition placeholder</strong></strong><p><p><span><span style="color: #4078c0;"></span></span></p></p><br><br></td> </tr> </tbody> </table><p><p>Detailed Description: http://ios.662p.com/thread-2527-1-1.html</p></p><p><p>End Photo Browser app iOS source</p></p></span>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.