├── AutoLaygout使用心得
├── AutoLayout-master
│ ├── AutoLayout.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ ├── xcshareddata
│ │ │ │ └── AutoLayout.xccheckout
│ │ │ └── xcuserdata
│ │ │ │ └── dren_a.xcuserdatad
│ │ │ │ └── UserInterfaceState.xcuserstate
│ │ └── xcuserdata
│ │ │ └── dren_a.xcuserdatad
│ │ │ ├── xcdebugger
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ │ └── xcschemes
│ │ │ ├── AutoLayout.xcscheme
│ │ │ └── xcschememanagement.plist
│ ├── AutoLayout
│ │ ├── AppDelegate.swift
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.xib
│ │ │ └── Main.storyboard
│ │ ├── FirstTableViewController.swift
│ │ ├── Images.xcassets
│ │ │ ├── 0.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── ___-1.png
│ │ │ ├── 1.imageset
│ │ │ │ ├── 1.png
│ │ │ │ └── Contents.json
│ │ │ ├── 2.imageset
│ │ │ │ ├── 2.png
│ │ │ │ └── Contents.json
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ ├── dayun.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── dayun@2x.png
│ │ │ ├── hidden_banner.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── hidden_banner@2x.png
│ │ │ ├── logo.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── logo@2x.png
│ │ │ └── xiaoyun.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── xiaoyun@2x.png
│ │ ├── Info.plist
│ │ ├── UIImage.swift
│ │ ├── ViewController.swift
│ │ ├── firstTableViewCell.swift
│ │ └── firstTableViewCell.xib
│ ├── AutoLayoutTests
│ │ ├── AutoLayoutTests.swift
│ │ └── Info.plist
│ ├── LICENSE
│ └── README.md
└── AutoLayout
│ ├── AutoLayout.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── AutoLayout.xccheckout
│ │ └── xcuserdata
│ │ │ ├── huangchengdu.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ │ │ └── yifan.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ ├── huangchengdu.xcuserdatad
│ │ └── xcschemes
│ │ │ ├── AutoLayout.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ └── yifan.xcuserdatad
│ │ └── xcschemes
│ │ ├── AutoLayout.xcscheme
│ │ └── xcschememanagement.plist
│ ├── AutoLayout
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── ViewController.swift
│ ├── firstTableViewCell.swift
│ ├── firstTableViewCell.xib
│ └── firstTableViewController.swift
│ └── AutoLayoutTests
│ ├── AutoLayoutTests.swift
│ └── Info.plist
├── LICENSE
├── Masonry+FDTemplateLayoutCell
├── test.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── test.xccheckout
│ │ └── xcuserdata
│ │ │ └── yifan.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── yifan.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── test.xcscheme
│ │ └── xcschememanagement.plist
├── test
│ ├── AFNetworking
│ │ ├── AFHTTPRequestOperation.h
│ │ ├── AFHTTPRequestOperation.m
│ │ ├── AFHTTPRequestOperationManager.h
│ │ ├── AFHTTPRequestOperationManager.m
│ │ ├── AFHTTPSessionManager.h
│ │ ├── AFHTTPSessionManager.m
│ │ ├── AFNetworkReachabilityManager.h
│ │ ├── AFNetworkReachabilityManager.m
│ │ ├── AFNetworking.h
│ │ ├── AFSecurityPolicy.h
│ │ ├── AFSecurityPolicy.m
│ │ ├── AFURLConnectionOperation.h
│ │ ├── AFURLConnectionOperation.m
│ │ ├── AFURLRequestSerialization.h
│ │ ├── AFURLRequestSerialization.m
│ │ ├── AFURLResponseSerialization.h
│ │ ├── AFURLResponseSerialization.m
│ │ ├── AFURLSessionManager.h
│ │ └── AFURLSessionManager.m
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Classes
│ │ ├── UITableView+FDTemplateLayoutCell.h
│ │ └── UITableView+FDTemplateLayoutCell.m
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── btn-ended.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn-ended@2x.png
│ │ │ └── btn-ended@3x.png
│ │ ├── btn-flashsales-2.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn-flashsales-2@2x.png
│ │ │ └── btn-flashsales-2@3x.png
│ │ ├── btn-flashsales-countdown.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn-flashsales-countdown@2x.png
│ │ │ └── btn-flashsales-countdown@3x.png
│ │ ├── btn-flashsales.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn-flashsales@2x.png
│ │ │ └── btn-flashsales@3x.png
│ │ └── btn-sold-out.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn-sold-out@2x.png
│ │ │ └── btn-sold-out@3x.png
│ ├── Info.plist
│ ├── MAYMiaoshaCell.h
│ ├── MAYMiaoshaCell.m
│ ├── MAYMiaoshaEntity.h
│ ├── MAYMiaoshaEntity.m
│ ├── MJExtension
│ │ ├── MJConst.h
│ │ ├── MJConst.m
│ │ ├── MJExtension.h
│ │ ├── MJFoundation.h
│ │ ├── MJFoundation.m
│ │ ├── MJIvar.h
│ │ ├── MJIvar.m
│ │ ├── MJType.h
│ │ ├── MJType.m
│ │ ├── NSObject+MJCoding.h
│ │ ├── NSObject+MJCoding.m
│ │ ├── NSObject+MJIvar.h
│ │ ├── NSObject+MJIvar.m
│ │ ├── NSObject+MJKeyValue.h
│ │ └── NSObject+MJKeyValue.m
│ ├── MYDownloadManager.h
│ ├── MYDownloadManager.m
│ ├── Masonry
│ │ ├── Info.plist
│ │ ├── MASCompositeConstraint.h
│ │ ├── MASCompositeConstraint.m
│ │ ├── MASConstraint+Private.h
│ │ ├── MASConstraint.h
│ │ ├── MASConstraint.m
│ │ ├── MASConstraintMaker.h
│ │ ├── MASConstraintMaker.m
│ │ ├── MASLayoutConstraint.h
│ │ ├── MASLayoutConstraint.m
│ │ ├── MASUtilities.h
│ │ ├── MASViewAttribute.h
│ │ ├── MASViewAttribute.m
│ │ ├── MASViewConstraint.h
│ │ ├── MASViewConstraint.m
│ │ ├── Masonry.h
│ │ ├── NSArray+MASAdditions.h
│ │ ├── NSArray+MASAdditions.m
│ │ ├── NSArray+MASShorthandAdditions.h
│ │ ├── NSLayoutConstraint+MASDebugAdditions.h
│ │ ├── NSLayoutConstraint+MASDebugAdditions.m
│ │ ├── View+MASAdditions.h
│ │ ├── View+MASAdditions.m
│ │ ├── View+MASShorthandAdditions.h
│ │ ├── ViewController+MASAdditions.h
│ │ └── ViewController+MASAdditions.m
│ ├── SDWebImage
│ │ ├── LICENSE
│ │ ├── MKAnnotationView+WebCache.h
│ │ ├── MKAnnotationView+WebCache.m
│ │ ├── NSData+ImageContentType.h
│ │ ├── NSData+ImageContentType.m
│ │ ├── README.md
│ │ ├── SDImageCache.h
│ │ ├── SDImageCache.m
│ │ ├── SDImageCacheDelegate.h
│ │ ├── SDWebImageCompat.h
│ │ ├── SDWebImageCompat.m
│ │ ├── SDWebImageDecoder.h
│ │ ├── SDWebImageDecoder.m
│ │ ├── SDWebImageDownloader.h
│ │ ├── SDWebImageDownloader.m
│ │ ├── SDWebImageDownloaderDelegate.h
│ │ ├── SDWebImageDownloaderOperation.h
│ │ ├── SDWebImageDownloaderOperation.m
│ │ ├── SDWebImageManager.h
│ │ ├── SDWebImageManager.m
│ │ ├── SDWebImageManagerDelegate.h
│ │ ├── SDWebImageOperation.h
│ │ ├── SDWebImagePrefetcher.h
│ │ ├── SDWebImagePrefetcher.m
│ │ ├── UIButton+WebCache.h
│ │ ├── UIButton+WebCache.m
│ │ ├── UIImage+GIF.h
│ │ ├── UIImage+GIF.m
│ │ ├── UIImage+MultiFormat.h
│ │ ├── UIImage+MultiFormat.m
│ │ ├── UIImage+WebP.h
│ │ ├── UIImage+WebP.m
│ │ ├── UIImageView+HighlightedWebCache.h
│ │ ├── UIImageView+HighlightedWebCache.m
│ │ ├── UIImageView+WebCache.h
│ │ ├── UIImageView+WebCache.m
│ │ ├── UIView+WebCacheOperation.h
│ │ └── UIView+WebCacheOperation.m
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── main.m
│ ├── xx.png
│ └── 自动计算文字数量所占高度
│ │ ├── AutoCheckWordsHeight.h
│ │ └── AutoCheckWordsHeight.m
└── testTests
│ ├── Info.plist
│ └── testTests.m
├── Masonry各种Demo
├── Masonry各种Demo.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── Masonry各种Demo.xccheckout
│ │ └── xcuserdata
│ │ │ ├── huangchengdu.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ │ │ └── yifan.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ ├── huangchengdu.xcuserdatad
│ │ └── xcschemes
│ │ │ ├── Masonry各种Demo.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ └── yifan.xcuserdatad
│ │ └── xcschemes
│ │ ├── Masonry各种Demo.xcscheme
│ │ └── xcschememanagement.plist
├── Masonry各种Demo
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── MMPlaceHolder
│ │ ├── MMPlaceHolder.h
│ │ └── MMPlaceHolder.m
│ ├── Masonry
│ │ ├── Info.plist
│ │ ├── MASCompositeConstraint.h
│ │ ├── MASCompositeConstraint.m
│ │ ├── MASConstraint+Private.h
│ │ ├── MASConstraint.h
│ │ ├── MASConstraint.m
│ │ ├── MASConstraintMaker.h
│ │ ├── MASConstraintMaker.m
│ │ ├── MASLayoutConstraint.h
│ │ ├── MASLayoutConstraint.m
│ │ ├── MASUtilities.h
│ │ ├── MASViewAttribute.h
│ │ ├── MASViewAttribute.m
│ │ ├── MASViewConstraint.h
│ │ ├── MASViewConstraint.m
│ │ ├── Masonry.h
│ │ ├── NSArray+MASAdditions.h
│ │ ├── NSArray+MASAdditions.m
│ │ ├── NSArray+MASShorthandAdditions.h
│ │ ├── NSLayoutConstraint+MASDebugAdditions.h
│ │ ├── NSLayoutConstraint+MASDebugAdditions.m
│ │ ├── View+MASAdditions.h
│ │ ├── View+MASAdditions.m
│ │ ├── View+MASShorthandAdditions.h
│ │ ├── ViewController+MASAdditions.h
│ │ └── ViewController+MASAdditions.m
│ ├── UIView+LJC.h
│ ├── UIView+LJC.m
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
└── Masonry各种DemoTests
│ ├── Info.plist
│ └── Masonry__DemoTests.m
├── NSLayoutConstraint基础篇
├── NSLayoutConstraint基础篇.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── huangchengdu.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── huangchengdu.xcuserdatad
│ │ └── xcschemes
│ │ ├── NSLayoutConstraint基础篇.xcscheme
│ │ └── xcschememanagement.plist
├── NSLayoutConstraint基础篇
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── NSLayoutConstraint基础篇Tests
│ ├── Info.plist
│ └── NSLayoutConstraint___Tests.m
└── NSLayoutConstraint基础篇UITests
│ ├── Info.plist
│ └── NSLayoutConstraint___UITests.m
├── README.md
├── UI布局(一)初探Size Class
├── UI布局(一)初探Size Class.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── huangchengdu.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── huangchengdu.xcuserdatad
│ │ └── xcschemes
│ │ ├── UI布局(一)初探Size Class.xcscheme
│ │ └── xcschememanagement.plist
├── UI布局(一)初探Size Class
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── UI布局(一)初探Size ClassTests
│ ├── Info.plist
│ └── UI_______Size_ClassTests.m
└── UI布局(一)初探Size ClassUITests
│ ├── Info.plist
│ └── UI_______Size_ClassUITests.m
├── UI布局(三)深入理解autolayout
├── UI布局(三)深入理解autolayout.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── huangchengdu.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── huangchengdu.xcuserdatad
│ │ └── xcschemes
│ │ ├── UI布局(三)深入理解autolayout.xcscheme
│ │ └── xcschememanagement.plist
├── UI布局(三)深入理解autolayout
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── UI布局(三)深入理解autolayoutTests
│ ├── Info.plist
│ └── UI_________autolayoutTests.m
└── UI布局(三)深入理解autolayoutUITests
│ ├── Info.plist
│ └── UI_________autolayoutUITests.m
├── UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class
├── UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── huangchengdu.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── huangchengdu.xcuserdatad
│ │ └── xcschemes
│ │ ├── UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class.xcscheme
│ │ └── xcschememanagement.plist
├── UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── SecondViewController.h
│ ├── SecondViewController.m
│ ├── Storyboard.storyboard
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size classTests
│ ├── Info.plist
│ └── UI_____storyboard_autolayout_size_classUI_____storyboard_autolayout_size_UI_____storyboard_autolayout_size_classTests.m
└── UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size classUITests
│ ├── Info.plist
│ └── UI_____storyboard_autolayout_size_classUI_____storyboard_autolayout_size_UI_____storyboard_autolayout_size_classUITests.m
├── 叶孤城Layout
├── AutoLayout
│ └── HCDAutoLayout
│ │ ├── HCDAutoLayout.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ ├── xcshareddata
│ │ │ │ └── HCDAutoLayout.xccheckout
│ │ │ └── xcuserdata
│ │ │ │ └── yifan.xcuserdatad
│ │ │ │ └── UserInterfaceState.xcuserstate
│ │ └── xcuserdata
│ │ │ └── yifan.xcuserdatad
│ │ │ └── xcschemes
│ │ │ ├── HCDAutoLayout.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ ├── HCDAutoLayout
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.xib
│ │ │ └── Main.storyboard
│ │ ├── Images.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Info.plist
│ │ ├── ViewController.h
│ │ ├── ViewController.m
│ │ └── main.m
│ │ └── HCDAutoLayoutTests
│ │ ├── HCDAutoLayoutTests.m
│ │ └── Info.plist
├── HCDAutoLayout2
│ ├── HCDAutoLayout2.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ ├── xcshareddata
│ │ │ │ └── HCDAutoLayout2.xccheckout
│ │ │ └── xcuserdata
│ │ │ │ └── yifan.xcuserdatad
│ │ │ │ └── UserInterfaceState.xcuserstate
│ │ └── xcuserdata
│ │ │ └── yifan.xcuserdatad
│ │ │ └── xcschemes
│ │ │ ├── HCDAutoLayout2.xcscheme
│ │ │ └── xcschememanagement.plist
│ ├── HCDAutoLayout2
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.xib
│ │ │ └── Main.storyboard
│ │ ├── Images.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ └── cloud.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── cloud_small.png
│ │ │ │ ├── cloud_small@2x.png
│ │ │ │ └── cloud_small@3x.png
│ │ ├── Info.plist
│ │ ├── ViewController.h
│ │ ├── ViewController.m
│ │ └── main.m
│ └── HCDAutoLayout2Tests
│ │ ├── HCDAutoLayout2Tests.m
│ │ └── Info.plist
├── SizeClass 和AutoLayout教程2
│ ├── SizeClass 和AutoLayout教程2.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcuserdata
│ │ │ │ └── huangchengdu.xcuserdatad
│ │ │ │ └── UserInterfaceState.xcuserstate
│ │ └── xcuserdata
│ │ │ └── huangchengdu.xcuserdatad
│ │ │ └── xcschemes
│ │ │ ├── SizeClass 和AutoLayout教程2.xcscheme
│ │ │ └── xcschememanagement.plist
│ ├── SizeClass 和AutoLayout教程2
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── ViewController.h
│ │ ├── ViewController.m
│ │ └── main.m
│ ├── SizeClass 和AutoLayout教程2Tests
│ │ ├── Info.plist
│ │ └── SizeClass__AutoLayout__2Tests.m
│ └── SizeClass 和AutoLayout教程2UITests
│ │ ├── Info.plist
│ │ └── SizeClass__AutoLayout__2UITests.m
└── SizeClass和AutoLayout教程1
│ ├── SizeClass和AutoLayout教程1.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── huangchengdu.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── huangchengdu.xcuserdatad
│ │ └── xcschemes
│ │ ├── SizeClass和AutoLayout教程1.xcscheme
│ │ └── xcschememanagement.plist
│ ├── SizeClass和AutoLayout教程1
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
│ ├── SizeClass和AutoLayout教程1Tests
│ ├── Info.plist
│ └── SizeClass_AutoLayout__1Tests.m
│ └── SizeClass和AutoLayout教程1UITests
│ ├── Info.plist
│ └── SizeClass_AutoLayout__1UITests.m
├── 开始iOS 7中自动布局教程(一)
├── 开始iOS 7中自动布局教程(一).xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── huangchengdu.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── huangchengdu.xcuserdatad
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── 开始iOS 7中自动布局教程(一).xcscheme
├── 开始iOS 7中自动布局教程(一)
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── 开始iOS 7中自动布局教程(一)Tests
│ ├── Info.plist
│ └── __iOS_7__________Tests.m
└── 开始iOS 7中自动布局教程(一)UITests
│ ├── Info.plist
│ └── __iOS_7__________UITests.m
├── 开始iOS 7中自动布局教程(二)
├── 开始iOS 7中自动布局教程(二).xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── huangchengdu.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── huangchengdu.xcuserdatad
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── 开始iOS 7中自动布局教程(二).xcscheme
├── 开始iOS 7中自动布局教程(二)
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── SecondViewController.h
│ ├── SecondViewController.m
│ ├── SecondViewController.xib
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── 开始iOS 7中自动布局教程(二)Tests
│ ├── Info.plist
│ └── __iOS_7__________Tests.m
└── 开始iOS 7中自动布局教程(二)UITests
│ ├── Info.plist
│ └── __iOS_7__________UITests.m
├── 第二章NSLayoutConstraint布局
├── 约束相关.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── huangchengdu.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── huangchengdu.xcuserdatad
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── 约束相关.xcscheme
├── 约束相关
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── FirstViewController.h
│ ├── FirstViewController.m
│ ├── Info.plist
│ ├── NSLayoutConstraint+ConstraintMatching.h
│ ├── NSLayoutConstraint+ConstraintMatching.m
│ ├── NSLayoutConstraint+SelfInstall.h
│ ├── NSLayoutConstraint+SelfInstall.m
│ ├── NSLayoutConstraint+ViewHierarchy.h
│ ├── NSLayoutConstraint+ViewHierarchy.m
│ ├── SecondViewController.h
│ ├── SecondViewController.m
│ ├── SecondViewController.xib
│ ├── UIView+ConstraintMatching.h
│ ├── UIView+ConstraintMatching.m
│ ├── UIView+HierarchySupport.h
│ ├── UIView+HierarchySupport.m
│ ├── UIView+Layout.h
│ ├── UIView+Layout.m
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── a.png
│ └── main.m
├── 约束相关Tests
│ ├── Info.plist
│ └── ____Tests.m
└── 约束相关UITests
│ ├── Info.plist
│ └── ____UITests.m
└── 自动布局计算cell高度的各种情况
├── CellHeightDemo.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ ├── tangxp.xcuserdatad
│ │ ├── UserInterfaceState.xcuserstate
│ │ └── WorkspaceSettings.xcsettings
│ │ └── yifan.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── xcuserdata
│ ├── tangxp.xcuserdatad
│ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ └── xcschemes
│ │ ├── CellHeightDemo.xcscheme
│ │ └── xcschememanagement.plist
│ └── yifan.xcuserdatad
│ ├── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
│ └── xcschemes
│ ├── CellHeightDemo.xcscheme
│ └── xcschememanagement.plist
├── CellHeightDemo
├── AppDelegate.h
├── AppDelegate.m
├── Base.lproj
│ └── Main.storyboard
├── BaseViewController.h
├── BaseViewController.m
├── CellHeightDemo-Info.plist
├── CellHeightDemo-Prefix.pch
├── Cells
│ ├── C1.h
│ ├── C1.m
│ ├── C1.xib
│ ├── C2.h
│ ├── C2.m
│ ├── C2.xib
│ ├── C3.h
│ ├── C3.m
│ ├── C3.xib
│ ├── C4.h
│ ├── C4.m
│ ├── C4.xib
│ ├── C5.h
│ ├── C5.m
│ └── C5.xib
├── Images.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── LaunchImage.launchimage
│ │ └── Contents.json
├── NSLayoutConstraint+ClassMethodPriority.h
├── NSLayoutConstraint+ClassMethodPriority.m
├── NSString+Ext.h
├── NSString+Ext.m
├── T1ViewController.h
├── T1ViewController.m
├── T2ViewController.h
├── T2ViewController.m
├── T3ViewController.h
├── T3ViewController.m
├── T4ViewController.h
├── T4ViewController.m
├── T5ViewController.h
├── T5ViewController.m
├── ViewController.h
├── ViewController.m
├── en.lproj
│ └── InfoPlist.strings
├── img.png
└── main.m
└── CellHeightDemoTests
├── CellHeightDemoTests-Info.plist
├── CellHeightDemoTests.m
└── en.lproj
└── InfoPlist.strings
/AutoLaygout使用心得/AutoLayout-master/AutoLayout.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout.xcodeproj/project.xcworkspace/xcuserdata/dren_a.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/AutoLaygout使用心得/AutoLayout-master/AutoLayout.xcodeproj/project.xcworkspace/xcuserdata/dren_a.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout.xcodeproj/xcuserdata/dren_a.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout.xcodeproj/xcuserdata/dren_a.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | AutoLayout.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 46DCF6411A9CD4F40005715C
16 |
17 | primary
18 |
19 |
20 | 46DCF6561A9CD4F40005715C
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/0.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "___-1.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/0.imageset/___-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/0.imageset/___-1.png
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/1.imageset/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/1.imageset/1.png
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "1.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/2.imageset/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/2.imageset/2.png
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "2.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/dayun.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "dayun@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/dayun.imageset/dayun@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/dayun.imageset/dayun@2x.png
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/hidden_banner.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "hidden_banner@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/hidden_banner.imageset/hidden_banner@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/hidden_banner.imageset/hidden_banner@2x.png
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/logo.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "logo@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/logo.imageset/logo@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/logo.imageset/logo@2x.png
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/xiaoyun.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "xiaoyun@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/xiaoyun.imageset/xiaoyun@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/AutoLaygout使用心得/AutoLayout-master/AutoLayout/Images.xcassets/xiaoyun.imageset/xiaoyun@2x.png
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout/UIImage.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage.swift
3 | // AutoLayout
4 | //
5 | // Created by JohnLui on 15/4/19.
6 | // Copyright (c) 2015年 Miao Tec Inc. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | extension UIImage {
12 | func resizeToSize(size: CGSize) -> UIImage {
13 | UIGraphicsBeginImageContextWithOptions(size, false, 0) // change from UIGraphicsBeginImageContext(size) to suit scale > 1
14 | self.drawInRect(CGRectMake(0, 0, size.width, size.height))
15 | let newImage = UIGraphicsGetImageFromCurrentImageContext()
16 | UIGraphicsEndImageContext()
17 |
18 | return newImage
19 | }
20 | }
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayout/firstTableViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // firstTableViewCell.swift
3 | // AutoLayout
4 | //
5 | // Created by JohnLui on 15/3/22.
6 | // Copyright (c) 2015年 Miao Tec Inc. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class firstTableViewCell: UITableViewCell {
12 |
13 | @IBOutlet weak var logoImageView: UIImageView!
14 | @IBOutlet weak var firstLabel: UILabel!
15 | override func awakeFromNib() {
16 | super.awakeFromNib()
17 | // Initialization code
18 | }
19 |
20 | override func setSelected(selected: Bool, animated: Bool) {
21 | super.setSelected(selected, animated: animated)
22 |
23 | // Configure the view for the selected state
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayoutTests/AutoLayoutTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AutoLayoutTests.swift
3 | // AutoLayoutTests
4 | //
5 | // Created by JohnLui on 15/2/24.
6 | // Copyright (c) 2015年 Miao Tec Inc. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class AutoLayoutTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/AutoLayoutTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.yishuodian.miao.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 JohnLui
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout-master/README.md:
--------------------------------------------------------------------------------
1 | ##《Auto Layout 使用心得》系列文章代码仓库
2 |
3 |
4 |
5 | ###开发环境
6 |
7 | * OS X 10.10.3
8 | * Xcode Version 6.3.1 (6D1002)
9 |
10 |
11 | ###文章链接
12 |
13 | ####1. [Auto Layout 使用心得(一)—— 初体验](http://lvwenhan.com/ios/430.html)
14 | ####2. [Auto Layout 使用心得(二)—— 实现三等分](http://lvwenhan.com/ios/431.html)
15 | 搭建过程:
16 |
17 | 
18 |
19 | ####3. [Auto Layout 使用心得(三)—— 自定义 cell 并使用 Auto Layout](http://lvwenhan.com/ios/441.html)
20 | ####4. [Auto Layout 使用心得(四)—— 22 行代码实现拖动回弹](http://lvwenhan.com/ios/442.html)
21 |
22 | 效果:
23 | 
24 |
25 | ####5. [Auto Layout 使用心得(五)—— 根据文字、图片自动计算 UITableViewCell 高度](http://lvwenhan.com/ios/449.html)
26 |
27 | 效果:
28 | 
29 |
30 |
31 | ####6. [Auto Layout 使用心得(六)—— 制造炫酷的下拉刷新动画](http://lvwenhan.com/ios/450.html)
32 |
33 | 效果:
34 | 
35 |
36 |
37 |
38 | #####有问题请直接在文章下面留言。
39 |
40 |
41 | > ####喜欢此系列文章可以点击上面右侧的 Star 哦,变成 Unstar 就可以了! :stuck_out_tongue_winking_eye:
42 |
43 |
44 |
45 | ### License
46 |
47 | 本项目采用 [MIT license](http://opensource.org/licenses/MIT) 开源,你可以利用采用该协议的代码做任何事情,只需要继续继承 MIT 协议即可。
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout/AutoLayout.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout/AutoLayout.xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/AutoLaygout使用心得/AutoLayout/AutoLayout.xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout/AutoLayout.xcodeproj/project.xcworkspace/xcuserdata/yifan.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/AutoLaygout使用心得/AutoLayout/AutoLayout.xcodeproj/project.xcworkspace/xcuserdata/yifan.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout/AutoLayout.xcodeproj/xcuserdata/huangchengdu.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | AutoLayout.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | DDBC07FD1B9C705B0015B73D
16 |
17 | primary
18 |
19 |
20 | DDBC08121B9C705B0015B73D
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout/AutoLayout.xcodeproj/xcuserdata/yifan.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | AutoLayout.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | DDBC07FD1B9C705B0015B73D
16 |
17 | primary
18 |
19 |
20 | DDBC08121B9C705B0015B73D
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout/AutoLayout/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout/AutoLayout/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ---.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout/AutoLayout/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // AutoLayout
4 | //
5 | // Created by yifan on 15/9/6.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view, typically from a nib.
16 | }
17 |
18 | override func didReceiveMemoryWarning() {
19 | super.didReceiveMemoryWarning()
20 | // Dispose of any resources that can be recreated.
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout/AutoLayout/firstTableViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // firstTableViewCell.swift
3 | // AutoLayout
4 | //
5 | // Created by yifan on 15/9/6.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class firstTableViewCell: UITableViewCell {
12 |
13 | override func awakeFromNib() {
14 | super.awakeFromNib()
15 | // Initialization code
16 | }
17 |
18 | override func setSelected(_ selected: Bool, animated: Bool) {
19 | super.setSelected(selected, animated: animated)
20 |
21 | // Configure the view for the selected state
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout/AutoLayout/firstTableViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // firstTableViewController.swift
3 | // AutoLayout
4 | //
5 | // Created by yifan on 15/9/6.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class firstTableViewController: UITableViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 |
16 | let nib = UINib(nibName: "firstTableViewCell", bundle: nil)
17 | self.tableView.register(nib, forCellReuseIdentifier: "firstTableViewCell")
18 | }
19 |
20 | override func didReceiveMemoryWarning() {
21 | super.didReceiveMemoryWarning()
22 | }
23 |
24 | // MARK: - Table view data source
25 |
26 | override func numberOfSections(in tableView: UITableView) -> Int {
27 | return 1
28 | }
29 |
30 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
31 | return 10
32 | }
33 |
34 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
35 | let cell = tableView.dequeueReusableCell(withIdentifier: "firstTableViewCell", for: indexPath) as! firstTableViewCell
36 |
37 | cell.textLabel?.text = indexPath.row.description
38 |
39 | return cell
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout/AutoLayoutTests/AutoLayoutTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AutoLayoutTests.swift
3 | // AutoLayoutTests
4 | //
5 | // Created by yifan on 15/9/6.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class AutoLayoutTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measure() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/AutoLaygout使用心得/AutoLayout/AutoLayoutTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ---.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test.xcodeproj/project.xcworkspace/xcuserdata/yifan.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/Masonry+FDTemplateLayoutCell/test.xcodeproj/project.xcworkspace/xcuserdata/yifan.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test.xcodeproj/xcuserdata/yifan.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | test.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | DDA0B1A71B82C30A005FE9D5
16 |
17 | primary
18 |
19 |
20 | DDA0B1C01B82C30A005FE9D5
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // test
4 | //
5 | // Created by yifan on 15/8/18.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-ended.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "btn-ended@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "btn-ended@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-ended.imageset/btn-ended@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-ended.imageset/btn-ended@2x.png
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-ended.imageset/btn-ended@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-ended.imageset/btn-ended@3x.png
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-flashsales-2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "btn-flashsales-2@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "btn-flashsales-2@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-flashsales-2.imageset/btn-flashsales-2@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-flashsales-2.imageset/btn-flashsales-2@2x.png
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-flashsales-2.imageset/btn-flashsales-2@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-flashsales-2.imageset/btn-flashsales-2@3x.png
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-flashsales-countdown.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "btn-flashsales-countdown@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "btn-flashsales-countdown@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-flashsales-countdown.imageset/btn-flashsales-countdown@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-flashsales-countdown.imageset/btn-flashsales-countdown@2x.png
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-flashsales-countdown.imageset/btn-flashsales-countdown@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-flashsales-countdown.imageset/btn-flashsales-countdown@3x.png
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-flashsales.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "btn-flashsales@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "btn-flashsales@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-flashsales.imageset/btn-flashsales@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-flashsales.imageset/btn-flashsales@2x.png
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-flashsales.imageset/btn-flashsales@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-flashsales.imageset/btn-flashsales@3x.png
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-sold-out.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "btn-sold-out@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "btn-sold-out@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-sold-out.imageset/btn-sold-out@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-sold-out.imageset/btn-sold-out@2x.png
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-sold-out.imageset/btn-sold-out@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/Masonry+FDTemplateLayoutCell/test/Images.xcassets/btn-sold-out.imageset/btn-sold-out@3x.png
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ---.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/MAYMiaoshaCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // MAYMiaoshaCell.h
3 | // test
4 | //
5 | // Created by yifan on 15/8/18.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MAYMiaoshaEntity.h"
11 |
12 | @interface MAYMiaoshaCell : UITableViewCell
13 | @property(nonatomic,strong)MAYMiaoshaEntity *entity;
14 | @property (copy, nonatomic) void (^imageTapCallBack)(NSNumber *);
15 | @end
16 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/MAYMiaoshaEntity.h:
--------------------------------------------------------------------------------
1 | //
2 | // MAYMiaoshaEntity.h
3 | // hhm
4 | //
5 | // Created by yifan on 15/8/17.
6 | // Copyright (c) 2015年 maxwin. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MAYMiaoshaEntity : NSObject
12 | @property(nonatomic,copy)NSString *CategoryName;
13 | @property(nonatomic,copy)NSString *Color;
14 | @property(nonatomic,copy)NSString *EndTime;
15 | @property(nonatomic,copy)NSString *ImgUrl;
16 | @property(nonatomic,assign)BOOL IsValid;
17 | @property(nonatomic,strong)NSNumber *LimitBuyCount;
18 | @property(nonatomic,copy)NSString *ProductGroupCode;
19 | @property(nonatomic,copy)NSString *ProductName;
20 | @property(nonatomic,strong)NSNumber *ProductSysNo;
21 | @property(nonatomic,strong)NSNumber *RemainEndTotalSeconds;
22 | @property(nonatomic,strong)NSNumber *RemainStartTotalSeconds;
23 | @property(nonatomic,strong)NSNumber *SecKillPrice;
24 | @property(nonatomic,copy)NSString *Size;
25 | @property(nonatomic,copy)NSString *SkuCode;
26 | @property(nonatomic,strong)NSNumber *SkuSysNo;
27 | @property(nonatomic,copy)NSString *StartTime;
28 | @property(nonatomic,strong)NSNumber *TotalCount;
29 | @end
30 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/MAYMiaoshaEntity.m:
--------------------------------------------------------------------------------
1 | //
2 | // MAYMiaoshaEntity.m
3 | // hhm
4 | //
5 | // Created by yifan on 15/8/17.
6 | // Copyright (c) 2015年 maxwin. All rights reserved.
7 | //
8 |
9 | #import "MAYMiaoshaEntity.h"
10 |
11 | @implementation MAYMiaoshaEntity
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/MJExtension/MJConst.m:
--------------------------------------------------------------------------------
1 | #ifndef __MJConst__M__
2 | #define __MJConst__M__
3 |
4 | #import
5 |
6 | /**
7 | * 成员变量类型(属性类型)
8 | */
9 | NSString *const MJTypeInt = @"i";
10 | NSString *const MJTypeFloat = @"f";
11 | NSString *const MJTypeDouble = @"d";
12 | NSString *const MJTypeLong = @"q";
13 | NSString *const MJTypeLongLong = @"q";
14 | NSString *const MJTypeChar = @"c";
15 | NSString *const MJTypeBOOL = @"c";
16 | NSString *const MJTypePointer = @"*";
17 |
18 | NSString *const MJTypeIvar = @"^{objc_ivar=}";
19 | NSString *const MJTypeMethod = @"^{objc_method=}";
20 | NSString *const MJTypeBlock = @"@?";
21 | NSString *const MJTypeClass = @"#";
22 | NSString *const MJTypeSEL = @":";
23 | NSString *const MJTypeId = @"@";
24 |
25 | #endif
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/MJExtension/MJExtension.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJExtension.h
3 | // MJExtension
4 | //
5 | // Created by mj on 14-1-15.
6 | // Copyright (c) 2014年 itcast. All rights reserved.
7 | // 代码地址:https://github.com/CoderMJLee/MJExtension
8 | // 代码地址:http://code4app.com/ios/%E5%AD%97%E5%85%B8-JSON-%E4%B8%8E%E6%A8%A1%E5%9E%8B%E7%9A%84%E8%BD%AC%E6%8D%A2/5339992a933bf062608b4c57
9 |
10 | #import "NSObject+MJCoding.h"
11 | #import "NSObject+MJIvar.h"
12 | #import "NSObject+MJKeyValue.h"
13 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/MJExtension/MJFoundation.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJFoundation.h
3 | // MJExtensionExample
4 | //
5 | // Created by MJ Lee on 14/7/16.
6 | // Copyright (c) 2014年 itcast. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MJFoundation : NSObject
12 | + (BOOL)isClassFromFoundation:(Class)c;
13 | @end
14 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/MJExtension/MJFoundation.m:
--------------------------------------------------------------------------------
1 | //
2 | // MJFoundation.m
3 | // MJExtensionExample
4 | //
5 | // Created by MJ Lee on 14/7/16.
6 | // Copyright (c) 2014年 itcast. All rights reserved.
7 | //
8 |
9 | #import "MJFoundation.h"
10 | #import "MJConst.h"
11 |
12 | static NSSet *_foundationClasses;
13 |
14 | @implementation MJFoundation
15 |
16 | + (void)load
17 | {
18 | _foundationClasses = [NSSet setWithObjects:
19 | [NSObject class],
20 | [NSURL class],
21 | [NSDate class],
22 | [NSNumber class],
23 | [NSDecimalNumber class],
24 | [NSData class],
25 | [NSMutableData class],
26 | [NSArray class],
27 | [NSMutableArray class],
28 | [NSDictionary class],
29 | [NSMutableDictionary class],
30 | [NSString class],
31 | [NSMutableString class], nil];
32 | }
33 |
34 | + (BOOL)isClassFromFoundation:(Class)c
35 | {
36 | return [_foundationClasses containsObject:c];
37 | }
38 | @end
39 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/MJExtension/MJType.h:
--------------------------------------------------------------------------------
1 | //
2 | // MJType.h
3 | // MJExtension
4 | //
5 | // Created by mj on 14-1-15.
6 | // Copyright (c) 2014年 itcast. All rights reserved.
7 | // 包装一种类型
8 |
9 | #import
10 | /**
11 | * 包装一种类型
12 | */
13 | @interface MJType : NSObject
14 | /** 类型标识符 */
15 | @property (nonatomic, copy) NSString *code;
16 |
17 | /** 是否为id类型 */
18 | @property (nonatomic, readonly, getter=isIdType) BOOL idType;
19 |
20 | /** 对象类型(如果是基本数据类型,此值为nil) */
21 | @property (nonatomic, readonly) Class typeClass;
22 |
23 | /** 类型是否来自于Foundation框架,比如NSString、NSArray */
24 | @property (nonatomic, readonly, getter = isFromFoundation) BOOL fromFoundation;
25 | /** 类型是否不支持KVC */
26 | @property (nonatomic, readonly, getter = isKVCDisabled) BOOL KVCDisabled;
27 |
28 | /**
29 | * 获得缓存的类型对象
30 | */
31 | + (instancetype)cachedTypeWithCode:(NSString *)code;
32 | @end
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/MJExtension/NSObject+MJCoding.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+MJCoding.h
3 | // MJExtension
4 | //
5 | // Created by mj on 14-1-15.
6 | // Copyright (c) 2014年 itcast. All rights reserved.
7 | //
8 |
9 | #import
10 | /**
11 | * Codeing协议
12 | */
13 | @protocol MJCoding
14 | @optional
15 | /**
16 | * 这个数组中的属性名将会被忽略:不进行归档
17 | */
18 | + (NSArray *)ignoredCodingPropertyNames;
19 | @end
20 |
21 | @interface NSObject (MJCoding)
22 | /**
23 | * 解码(从文件中解析对象)
24 | */
25 | - (void)decode:(NSCoder *)decoder;
26 | /**
27 | * 编码(将对象写入文件中)
28 | */
29 | - (void)encode:(NSCoder *)encoder;
30 | @end
31 |
32 | /**
33 | 归档的实现
34 | */
35 | #define MJCodingImplementation \
36 | - (id)initWithCoder:(NSCoder *)decoder \
37 | { \
38 | if (self = [super init]) { \
39 | [self decode:decoder]; \
40 | } \
41 | return self; \
42 | } \
43 | \
44 | - (void)encodeWithCoder:(NSCoder *)encoder \
45 | { \
46 | [self encode:encoder]; \
47 | }
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/MJExtension/NSObject+MJIvar.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+MJIvar.h
3 | // MJExtension
4 | //
5 | // Created by mj on 14-1-15.
6 | // Copyright (c) 2014年 itcast. All rights reserved.
7 | //
8 |
9 | #import
10 | @class MJIvar;
11 |
12 | /**
13 | * 遍历所有类的block(父类)
14 | */
15 | typedef void (^MJClassesBlock)(Class c, BOOL *stop);
16 |
17 | /**
18 | * 遍历成员变量用的block
19 | *
20 | * @param ivar 成员变量的包装对象
21 | * @param stop YES代表停止遍历,NO代表继续遍历
22 | */
23 | typedef void (^MJIvarsBlock)(MJIvar *ivar, BOOL *stop);
24 |
25 | @interface NSObject (MJMember)
26 |
27 | /**
28 | * 遍历所有的成员变量
29 | */
30 | + (void)enumerateIvarsWithBlock:(MJIvarsBlock)block;
31 |
32 | /**
33 | * 遍历所有的类
34 | */
35 | + (void)enumerateClassesWithBlock:(MJClassesBlock)block;
36 |
37 | /**
38 | * 返回一个临时对象
39 | */
40 | + (instancetype)tempObject;
41 | @end
42 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Masonry/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.cloudling.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Masonry/MASCompositeConstraint.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASCompositeConstraint.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 21/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASConstraint.h"
10 | #import "MASUtilities.h"
11 |
12 | /**
13 | * A group of MASConstraint objects
14 | */
15 | @interface MASCompositeConstraint : MASConstraint
16 |
17 | /**
18 | * Creates a composite with a predefined array of children
19 | *
20 | * @param children child MASConstraints
21 | *
22 | * @return a composite constraint
23 | */
24 | - (id)initWithChildren:(NSArray *)children;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Masonry/MASLayoutConstraint.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASLayoutConstraint.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 3/08/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "MASUtilities.h"
10 |
11 | /**
12 | * When you are debugging or printing the constraints attached to a view this subclass
13 | * makes it easier to identify which constraints have been created via Masonry
14 | */
15 | @interface MASLayoutConstraint : NSLayoutConstraint
16 |
17 | /**
18 | * a key to associate with this constraint
19 | */
20 | @property (nonatomic, strong) id mas_key;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Masonry/MASLayoutConstraint.m:
--------------------------------------------------------------------------------
1 | //
2 | // MASLayoutConstraint.m
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 3/08/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "MASLayoutConstraint.h"
10 |
11 | @implementation MASLayoutConstraint
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Masonry/MASViewAttribute.m:
--------------------------------------------------------------------------------
1 | //
2 | // MASAttribute.m
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 21/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASViewAttribute.h"
10 |
11 | @implementation MASViewAttribute
12 |
13 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute {
14 | self = [self initWithView:view item:view layoutAttribute:layoutAttribute];
15 | return self;
16 | }
17 |
18 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute {
19 | self = [super init];
20 | if (!self) return nil;
21 |
22 | _view = view;
23 | _item = item;
24 | _layoutAttribute = layoutAttribute;
25 |
26 | return self;
27 | }
28 |
29 | - (BOOL)isSizeAttribute {
30 | return self.layoutAttribute == NSLayoutAttributeWidth
31 | || self.layoutAttribute == NSLayoutAttributeHeight;
32 | }
33 |
34 | - (BOOL)isEqual:(MASViewAttribute *)viewAttribute {
35 | if ([viewAttribute isKindOfClass:self.class]) {
36 | return self.view == viewAttribute.view
37 | && self.layoutAttribute == viewAttribute.layoutAttribute;
38 | }
39 | return [super isEqual:viewAttribute];
40 | }
41 |
42 | - (NSUInteger)hash {
43 | return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute;
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Masonry/Masonry.h:
--------------------------------------------------------------------------------
1 | //
2 | // Masonry.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 20/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for Masonry.
12 | FOUNDATION_EXPORT double MasonryVersionNumber;
13 |
14 | //! Project version string for Masonry.
15 | FOUNDATION_EXPORT const unsigned char MasonryVersionString[];
16 |
17 | #import "MASUtilities.h"
18 | #import "View+MASAdditions.h"
19 | #import "View+MASShorthandAdditions.h"
20 | #import "ViewController+MASAdditions.h"
21 | #import "NSArray+MASAdditions.h"
22 | #import "NSArray+MASShorthandAdditions.h"
23 | #import "MASConstraint.h"
24 | #import "MASCompositeConstraint.h"
25 | #import "MASViewAttribute.h"
26 | #import "MASViewConstraint.h"
27 | #import "MASConstraintMaker.h"
28 | #import "MASLayoutConstraint.h"
29 | #import "NSLayoutConstraint+MASDebugAdditions.h"
30 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Masonry/NSArray+MASShorthandAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+MASShorthandAdditions.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 22/07/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "NSArray+MASAdditions.h"
10 |
11 | #ifdef MAS_SHORTHAND
12 |
13 | /**
14 | * Shorthand array additions without the 'mas_' prefixes,
15 | * only enabled if MAS_SHORTHAND is defined
16 | */
17 | @interface NSArray (MASShorthandAdditions)
18 |
19 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block;
20 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block;
21 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block;
22 |
23 | @end
24 |
25 | @implementation NSArray (MASShorthandAdditions)
26 |
27 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block {
28 | return [self mas_makeConstraints:block];
29 | }
30 |
31 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block {
32 | return [self mas_updateConstraints:block];
33 | }
34 |
35 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block {
36 | return [self mas_remakeConstraints:block];
37 | }
38 |
39 | @end
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Masonry/NSLayoutConstraint+MASDebugAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSLayoutConstraint+MASDebugAdditions.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 3/08/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "MASUtilities.h"
10 |
11 | /**
12 | * makes debug and log output of NSLayoutConstraints more readable
13 | */
14 | @interface NSLayoutConstraint (MASDebugAdditions)
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Masonry/ViewController+MASAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+MASAdditions.h
3 | // Masonry
4 | //
5 | // Created by Craig Siemens on 2015-06-23.
6 | //
7 | //
8 |
9 | #import "MASUtilities.h"
10 | #import "MASConstraintMaker.h"
11 | #import "MASViewAttribute.h"
12 |
13 | #ifdef MAS_VIEW_CONTROLLER
14 |
15 | @interface MAS_VIEW_CONTROLLER (MASAdditions)
16 |
17 | /**
18 | * following properties return a new MASViewAttribute with appropriate UILa 8youtGuide and NSLayoutAttribute
19 | */
20 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuide;
21 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide;
22 |
23 | @end
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/Masonry/ViewController+MASAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+MASAdditions.m
3 | // Masonry
4 | //
5 | // Created by Craig Siemens on 2015-06-23.
6 | //
7 | //
8 |
9 | #import "ViewController+MASAdditions.h"
10 |
11 | #ifdef MAS_VIEW_CONTROLLER
12 |
13 | @implementation MAS_VIEW_CONTROLLER (MASAdditions)
14 |
15 | - (MASViewAttribute *)mas_topLayoutGuide {
16 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
17 | }
18 |
19 | - (MASViewAttribute *)mas_bottomLayoutGuide {
20 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop];
21 | }
22 |
23 | @end
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/SDWebImage/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009 Olivier Poitrey
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
21 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/SDWebImage/NSData+ImageContentType.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Fabrice Aneche on 06/01/14.
3 | // Copyright (c) 2014 Dailymotion. All rights reserved.
4 | //
5 |
6 | #import
7 |
8 | @interface NSData (ImageContentType)
9 |
10 | /**
11 | * Compute the content type for an image data
12 | *
13 | * @param data the input data
14 | *
15 | * @return the content type as string (i.e. image/jpeg, image/gif)
16 | */
17 | + (NSString *)sd_contentTypeForImageData:(NSData *)data;
18 |
19 | @end
20 |
21 |
22 | @interface NSData (ImageContentTypeDeprecated)
23 |
24 | + (NSString *)contentTypeForImageData:(NSData *)data __deprecated_msg("Use `sd_contentTypeForImageData:`");
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/SDWebImage/SDImageCacheDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // SDImageCacheDelegate.h
3 | // Dailymotion
4 | //
5 | // Created by Olivier Poitrey on 16/09/10.
6 | // Copyright 2010 Dailymotion. All rights reserved.
7 | //
8 |
9 | #import "SDWebImageCompat.h"
10 |
11 | @class SDImageCache;
12 |
13 | @protocol SDImageCacheDelegate
14 |
15 | @optional
16 | - (void)imageCache:(SDImageCache *)imageCache didFindImage:(UIImage *)image forKey:(NSString *)key userInfo:(NSDictionary *)info;
17 | - (void)imageCache:(SDImageCache *)imageCache didNotFindImageForKey:(NSString *)key userInfo:(NSDictionary *)info;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/SDWebImage/SDWebImageDecoder.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * Created by james on 9/28/11.
6 | *
7 | * For the full copyright and license information, please view the LICENSE
8 | * file that was distributed with this source code.
9 | */
10 |
11 | #import
12 | #import "SDWebImageCompat.h"
13 |
14 | @interface UIImage (ForceDecode)
15 |
16 | + (UIImage *)decodedImageWithImage:(UIImage *)image;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/SDWebImage/SDWebImageDownloaderDelegate.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #import "SDWebImageCompat.h"
10 |
11 | @class SDWebImageDownloader;
12 |
13 | @protocol SDWebImageDownloaderDelegate
14 |
15 | @optional
16 |
17 | - (void)imageDownloaderDidFinish:(SDWebImageDownloader *)downloader;
18 | - (void)imageDownloader:(SDWebImageDownloader *)downloader didFinishWithImage:(UIImage *)image;
19 | - (void)imageDownloader:(SDWebImageDownloader *)downloader didFailWithError:(NSError *)error;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/SDWebImage/SDWebImageManagerDelegate.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | @class SDWebImageManager;
10 | @class UIImage;
11 |
12 | @protocol SDWebImageManagerDelegate
13 |
14 | @optional
15 |
16 | - (void)webImageManager:(SDWebImageManager *)imageManager didFinishWithImage:(UIImage *)image;
17 | - (void)webImageManager:(SDWebImageManager *)imageManager didFailWithError:(NSError *)error;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/SDWebImage/SDWebImageOperation.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #import
10 |
11 | @protocol SDWebImageOperation
12 |
13 | - (void)cancel;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/SDWebImage/UIImage+GIF.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+GIF.h
3 | // LBGIFImage
4 | //
5 | // Created by Laurin Brandner on 06.01.12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIImage (GIF)
12 |
13 | + (UIImage *)sd_animatedGIFNamed:(NSString *)name;
14 |
15 | + (UIImage *)sd_animatedGIFWithData:(NSData *)data;
16 |
17 | - (UIImage *)sd_animatedImageByScalingAndCroppingToSize:(CGSize)size;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/SDWebImage/UIImage+MultiFormat.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+MultiFormat.h
3 | // SDWebImage
4 | //
5 | // Created by Olivier Poitrey on 07/06/13.
6 | // Copyright (c) 2013 Dailymotion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIImage (MultiFormat)
12 |
13 | + (UIImage *)sd_imageWithData:(NSData *)data;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/SDWebImage/UIImage+WebP.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+WebP.h
3 | // SDWebImage
4 | //
5 | // Created by Olivier Poitrey on 07/06/13.
6 | // Copyright (c) 2013 Dailymotion. All rights reserved.
7 | //
8 |
9 | #ifdef SD_WEBP
10 |
11 | #import
12 |
13 | // Fix for issue #416 Undefined symbols for architecture armv7 since WebP introduction when deploying to device
14 | void WebPInitPremultiplyNEON(void);
15 |
16 | void WebPInitUpsamplersNEON(void);
17 |
18 | void VP8DspInitNEON(void);
19 |
20 | @interface UIImage (WebP)
21 |
22 | + (UIImage *)sd_imageWithWebPData:(NSData *)data;
23 |
24 | @end
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/SDWebImage/UIView+WebCacheOperation.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the SDWebImage package.
3 | * (c) Olivier Poitrey
4 | *
5 | * For the full copyright and license information, please view the LICENSE
6 | * file that was distributed with this source code.
7 | */
8 |
9 | #import
10 | #import "SDWebImageManager.h"
11 |
12 | @interface UIView (WebCacheOperation)
13 |
14 | /**
15 | * Set the image load operation (storage in a UIView based dictionary)
16 | *
17 | * @param operation the operation
18 | * @param key key for storing the operation
19 | */
20 | - (void)sd_setImageLoadOperation:(id)operation forKey:(NSString *)key;
21 |
22 | /**
23 | * Cancel all operations for the current UIView and key
24 | *
25 | * @param key key for identifying the operations
26 | */
27 | - (void)sd_cancelImageLoadOperationWithKey:(NSString *)key;
28 |
29 | /**
30 | * Just remove the operations corresponding to the current UIView and key without cancelling them
31 | *
32 | * @param key key for identifying the operations
33 | */
34 | - (void)sd_removeImageLoadOperationWithKey:(NSString *)key;
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // test
4 | //
5 | // Created by yifan on 15/8/18.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // test
4 | //
5 | // Created by yifan on 15/8/18.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/xx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/Masonry+FDTemplateLayoutCell/test/xx.png
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/test/自动计算文字数量所占高度/AutoCheckWordsHeight.h:
--------------------------------------------------------------------------------
1 | //
2 | // AutoCheckWordsHeight.h
3 | // Project_oschina
4 | //
5 | // Created by haoRan on 15/1/14.
6 | // Copyright (c) 2015年 apple. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface AutoCheckWordsHeight : NSObject
13 |
14 | /**
15 | * 返回多行文本的文字高度
16 | *
17 | * @param str <#str description#>
18 | * @param font <#font description#>
19 | * @param width <#width description#>
20 | * @param mode <#mode description#>
21 | *
22 | * @return <#return value description#>
23 | */
24 | +(CGSize)sizeOfStr:(NSString *)str withFont:(UIFont *)font withMaxWidth:(CGFloat)width withLineBreakMode:(NSLineBreakMode)mode;
25 |
26 | /**
27 | * 返回单行文本的长度
28 | *
29 | * @param str <#str description#>
30 | *
31 | * @return <#return value description#>
32 | */
33 | + (CGSize)oneLineTextLongWithStr:(NSString *)str withFont:(UIFont *)font;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/testTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ---.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Masonry+FDTemplateLayoutCell/testTests/testTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // testTests.m
3 | // testTests
4 | //
5 | // Created by yifan on 15/8/18.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface testTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation testTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo.xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/Masonry各种Demo/Masonry各种Demo.xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo.xcodeproj/project.xcworkspace/xcuserdata/yifan.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/Masonry各种Demo/Masonry各种Demo.xcodeproj/project.xcworkspace/xcuserdata/yifan.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo.xcodeproj/xcuserdata/huangchengdu.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Masonry各种Demo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | DD102D2D1B74B317006B202E
16 |
17 | primary
18 |
19 |
20 | DD102D461B74B317006B202E
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo.xcodeproj/xcuserdata/yifan.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Masonry各种Demo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | DD102D2D1B74B317006B202E
16 |
17 | primary
18 |
19 |
20 | DD102D461B74B317006B202E
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // Masonry各种Demo
4 | //
5 | // Created by yifan on 15/8/7.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ---.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo/Masonry/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.cloudling.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo/Masonry/MASCompositeConstraint.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASCompositeConstraint.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 21/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASConstraint.h"
10 | #import "MASUtilities.h"
11 |
12 | /**
13 | * A group of MASConstraint objects
14 | */
15 | @interface MASCompositeConstraint : MASConstraint
16 |
17 | /**
18 | * Creates a composite with a predefined array of children
19 | *
20 | * @param children child MASConstraints
21 | *
22 | * @return a composite constraint
23 | */
24 | - (id)initWithChildren:(NSArray *)children;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo/Masonry/MASLayoutConstraint.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASLayoutConstraint.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 3/08/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "MASUtilities.h"
10 |
11 | /**
12 | * When you are debugging or printing the constraints attached to a view this subclass
13 | * makes it easier to identify which constraints have been created via Masonry
14 | */
15 | @interface MASLayoutConstraint : NSLayoutConstraint
16 |
17 | /**
18 | * a key to associate with this constraint
19 | */
20 | @property (nonatomic, strong) id mas_key;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo/Masonry/MASLayoutConstraint.m:
--------------------------------------------------------------------------------
1 | //
2 | // MASLayoutConstraint.m
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 3/08/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "MASLayoutConstraint.h"
10 |
11 | @implementation MASLayoutConstraint
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo/Masonry/MASViewAttribute.m:
--------------------------------------------------------------------------------
1 | //
2 | // MASAttribute.m
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 21/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "MASViewAttribute.h"
10 |
11 | @implementation MASViewAttribute
12 |
13 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute {
14 | self = [self initWithView:view item:view layoutAttribute:layoutAttribute];
15 | return self;
16 | }
17 |
18 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute {
19 | self = [super init];
20 | if (!self) return nil;
21 |
22 | _view = view;
23 | _item = item;
24 | _layoutAttribute = layoutAttribute;
25 |
26 | return self;
27 | }
28 |
29 | - (BOOL)isSizeAttribute {
30 | return self.layoutAttribute == NSLayoutAttributeWidth
31 | || self.layoutAttribute == NSLayoutAttributeHeight;
32 | }
33 |
34 | - (BOOL)isEqual:(MASViewAttribute *)viewAttribute {
35 | if ([viewAttribute isKindOfClass:self.class]) {
36 | return self.view == viewAttribute.view
37 | && self.layoutAttribute == viewAttribute.layoutAttribute;
38 | }
39 | return [super isEqual:viewAttribute];
40 | }
41 |
42 | - (NSUInteger)hash {
43 | return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute;
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo/Masonry/Masonry.h:
--------------------------------------------------------------------------------
1 | //
2 | // Masonry.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 20/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for Masonry.
12 | FOUNDATION_EXPORT double MasonryVersionNumber;
13 |
14 | //! Project version string for Masonry.
15 | FOUNDATION_EXPORT const unsigned char MasonryVersionString[];
16 |
17 | #import "MASUtilities.h"
18 | #import "View+MASAdditions.h"
19 | #import "View+MASShorthandAdditions.h"
20 | #import "ViewController+MASAdditions.h"
21 | #import "NSArray+MASAdditions.h"
22 | #import "NSArray+MASShorthandAdditions.h"
23 | #import "MASConstraint.h"
24 | #import "MASCompositeConstraint.h"
25 | #import "MASViewAttribute.h"
26 | #import "MASViewConstraint.h"
27 | #import "MASConstraintMaker.h"
28 | #import "MASLayoutConstraint.h"
29 | #import "NSLayoutConstraint+MASDebugAdditions.h"
30 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo/Masonry/NSArray+MASShorthandAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+MASShorthandAdditions.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 22/07/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "NSArray+MASAdditions.h"
10 |
11 | #ifdef MAS_SHORTHAND
12 |
13 | /**
14 | * Shorthand array additions without the 'mas_' prefixes,
15 | * only enabled if MAS_SHORTHAND is defined
16 | */
17 | @interface NSArray (MASShorthandAdditions)
18 |
19 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block;
20 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block;
21 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block;
22 |
23 | @end
24 |
25 | @implementation NSArray (MASShorthandAdditions)
26 |
27 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block {
28 | return [self mas_makeConstraints:block];
29 | }
30 |
31 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block {
32 | return [self mas_updateConstraints:block];
33 | }
34 |
35 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block {
36 | return [self mas_remakeConstraints:block];
37 | }
38 |
39 | @end
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo/Masonry/NSLayoutConstraint+MASDebugAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSLayoutConstraint+MASDebugAdditions.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 3/08/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import "MASUtilities.h"
10 |
11 | /**
12 | * makes debug and log output of NSLayoutConstraints more readable
13 | */
14 | @interface NSLayoutConstraint (MASDebugAdditions)
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo/Masonry/ViewController+MASAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+MASAdditions.h
3 | // Masonry
4 | //
5 | // Created by Craig Siemens on 2015-06-23.
6 | //
7 | //
8 |
9 | #import "MASUtilities.h"
10 | #import "MASConstraintMaker.h"
11 | #import "MASViewAttribute.h"
12 |
13 | #ifdef MAS_VIEW_CONTROLLER
14 |
15 | @interface MAS_VIEW_CONTROLLER (MASAdditions)
16 |
17 | /**
18 | * following properties return a new MASViewAttribute with appropriate UILa 8youtGuide and NSLayoutAttribute
19 | */
20 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuide;
21 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide;
22 |
23 | @end
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo/Masonry/ViewController+MASAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+MASAdditions.m
3 | // Masonry
4 | //
5 | // Created by Craig Siemens on 2015-06-23.
6 | //
7 | //
8 |
9 | #import "ViewController+MASAdditions.h"
10 |
11 | #ifdef MAS_VIEW_CONTROLLER
12 |
13 | @implementation MAS_VIEW_CONTROLLER (MASAdditions)
14 |
15 | - (MASViewAttribute *)mas_topLayoutGuide {
16 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
17 | }
18 |
19 | - (MASViewAttribute *)mas_bottomLayoutGuide {
20 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop];
21 | }
22 |
23 | @end
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo/UIView+LJC.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+LJC.h
3 | // DemoMasonry
4 | //
5 | // Created by Ralph Li on 7/1/15.
6 | // Copyright (c) 2015 LJC. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIView (LJC)
12 |
13 | - (void) distributeSpacingHorizontallyWith:(NSArray*)views;
14 | - (void) distributeSpacingVerticallyWith:(NSArray*)views;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // Masonry各种Demo
4 | //
5 | // Created by yifan on 15/8/7.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种Demo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // Masonry各种Demo
4 | //
5 | // Created by yifan on 15/8/7.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种DemoTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ---.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Masonry各种Demo/Masonry各种DemoTests/Masonry__DemoTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Masonry__DemoTests.m
3 | // Masonry各种DemoTests
4 | //
5 | // Created by yifan on 15/8/7.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface Masonry__DemoTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation Masonry__DemoTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/NSLayoutConstraint基础篇/NSLayoutConstraint基础篇.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/NSLayoutConstraint基础篇/NSLayoutConstraint基础篇.xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/NSLayoutConstraint基础篇/NSLayoutConstraint基础篇.xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/NSLayoutConstraint基础篇/NSLayoutConstraint基础篇.xcodeproj/xcuserdata/huangchengdu.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | NSLayoutConstraint基础篇.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 4D264E4B1CA2A101006A560A
16 |
17 | primary
18 |
19 |
20 | 4D264E641CA2A102006A560A
21 |
22 | primary
23 |
24 |
25 | 4D264E6F1CA2A102006A560A
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/NSLayoutConstraint基础篇/NSLayoutConstraint基础篇/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // NSLayoutConstraint基础篇
4 | //
5 | // Created by huangchengdu on 16/3/23.
6 | //
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/NSLayoutConstraint基础篇/NSLayoutConstraint基础篇/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // NSLayoutConstraint基础篇
4 | //
5 | // Created by huangchengdu on 16/3/23.
6 | //
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/NSLayoutConstraint基础篇/NSLayoutConstraint基础篇/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // NSLayoutConstraint基础篇
4 | //
5 | // Created by huangchengdu on 16/3/23.
6 | //
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | #warning 参考博客地址:http://www.cnblogs.com/xieyajie/p/4612697.html
12 |
13 | @interface ViewController ()
14 | @property (weak, nonatomic) IBOutlet UILabel *Label1;
15 | @property (weak, nonatomic) IBOutlet UILabel *Label2;
16 |
17 | @end
18 |
19 | @implementation ViewController
20 |
21 | - (void)viewDidLoad {
22 | [super viewDidLoad];
23 |
24 | self.view .translatesAutoresizingMaskIntoConstraints = NO;
25 | self.Label1.translatesAutoresizingMaskIntoConstraints = NO;
26 |
27 | self.Label2.translatesAutoresizingMaskIntoConstraints = NO;
28 |
29 | [self.view addConstraint:[NSLayoutConstraint constraintWithItem:_Label1 attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:20]];
30 | [self.view addConstraint:[NSLayoutConstraint constraintWithItem:_Label1 attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:20]];
31 |
32 | }
33 |
34 | - (IBAction)clickButton:(id)sender {
35 |
36 |
37 |
38 |
39 | }
40 |
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/NSLayoutConstraint基础篇/NSLayoutConstraint基础篇/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // NSLayoutConstraint基础篇
4 | //
5 | // Created by huangchengdu on 16/3/23.
6 | //
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/NSLayoutConstraint基础篇/NSLayoutConstraint基础篇Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/NSLayoutConstraint基础篇/NSLayoutConstraint基础篇Tests/NSLayoutConstraint___Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSLayoutConstraint___Tests.m
3 | // NSLayoutConstraint基础篇Tests
4 | //
5 | // Created by huangchengdu on 16/3/23.
6 | //
7 | //
8 |
9 | #import
10 |
11 | @interface NSLayoutConstraint___Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation NSLayoutConstraint___Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/NSLayoutConstraint基础篇/NSLayoutConstraint基础篇UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/UI布局(一)初探Size Class/UI布局(一)初探Size Class.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/UI布局(一)初探Size Class/UI布局(一)初探Size Class.xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/UI布局(一)初探Size Class/UI布局(一)初探Size Class.xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/UI布局(一)初探Size Class/UI布局(一)初探Size Class.xcodeproj/xcuserdata/huangchengdu.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | UI布局(一)初探Size Class.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 4D5BEABD1C4F8AC800B038C9
16 |
17 | primary
18 |
19 |
20 | 4D5BEAD61C4F8AC800B038C9
21 |
22 | primary
23 |
24 |
25 | 4D5BEAE11C4F8AC800B038C9
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/UI布局(一)初探Size Class/UI布局(一)初探Size Class/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // UI布局(一)初探Size Class
4 | //
5 | // Created by huangchengdu on 16/1/20.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/UI布局(一)初探Size Class/UI布局(一)初探Size Class/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // UI布局(一)初探Size Class
4 | //
5 | // Created by huangchengdu on 16/1/20.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/UI布局(一)初探Size Class/UI布局(一)初探Size Class/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // UI布局(一)初探Size Class
4 | //
5 | // Created by huangchengdu on 16/1/20.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | self.edgesForExtendedLayout = UIRectEdgeNone;
20 |
21 | // Do any additional setup after loading the view, typically from a nib.
22 | }
23 |
24 | - (void)didReceiveMemoryWarning {
25 | [super didReceiveMemoryWarning];
26 | // Dispose of any resources that can be recreated.
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/UI布局(一)初探Size Class/UI布局(一)初探Size Class/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // UI布局(一)初探Size Class
4 | //
5 | // Created by huangchengdu on 16/1/20.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/UI布局(一)初探Size Class/UI布局(一)初探Size ClassTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/UI布局(一)初探Size Class/UI布局(一)初探Size ClassTests/UI_______Size_ClassTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // UI_______Size_ClassTests.m
3 | // UI布局(一)初探Size ClassTests
4 | //
5 | // Created by huangchengdu on 16/1/20.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UI_______Size_ClassTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation UI_______Size_ClassTests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/UI布局(一)初探Size Class/UI布局(一)初探Size ClassUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/UI布局(三)深入理解autolayout/UI布局(三)深入理解autolayout.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/UI布局(三)深入理解autolayout/UI布局(三)深入理解autolayout.xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/UI布局(三)深入理解autolayout/UI布局(三)深入理解autolayout.xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/UI布局(三)深入理解autolayout/UI布局(三)深入理解autolayout.xcodeproj/xcuserdata/huangchengdu.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | UI布局(三)深入理解autolayout.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 4D5BEB421C4FB08D00B038C9
16 |
17 | primary
18 |
19 |
20 | 4D5BEB5B1C4FB08D00B038C9
21 |
22 | primary
23 |
24 |
25 | 4D5BEB661C4FB08D00B038C9
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/UI布局(三)深入理解autolayout/UI布局(三)深入理解autolayout/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // UI布局(三)深入理解autolayout
4 | //
5 | // Created by huangchengdu on 16/1/20.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/UI布局(三)深入理解autolayout/UI布局(三)深入理解autolayout/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // UI布局(三)深入理解autolayout
4 | //
5 | // Created by huangchengdu on 16/1/20.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/UI布局(三)深入理解autolayout/UI布局(三)深入理解autolayout/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // UI布局(三)深入理解autolayout
4 | //
5 | // Created by huangchengdu on 16/1/20.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/UI布局(三)深入理解autolayout/UI布局(三)深入理解autolayout/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // UI布局(三)深入理解autolayout
4 | //
5 | // Created by huangchengdu on 16/1/20.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/UI布局(三)深入理解autolayout/UI布局(三)深入理解autolayoutTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/UI布局(三)深入理解autolayout/UI布局(三)深入理解autolayoutTests/UI_________autolayoutTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // UI_________autolayoutTests.m
3 | // UI布局(三)深入理解autolayoutTests
4 | //
5 | // Created by huangchengdu on 16/1/20.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UI_________autolayoutTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation UI_________autolayoutTests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/UI布局(三)深入理解autolayout/UI布局(三)深入理解autolayoutUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class.xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class.xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class.xcodeproj/xcuserdata/huangchengdu.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 4D5BEAFC1C4F93D800B038C9
16 |
17 | primary
18 |
19 |
20 | 4D5BEB151C4F93D800B038C9
21 |
22 | primary
23 |
24 |
25 | 4D5BEB201C4F93D800B038C9
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class
4 | //
5 | // Created by huangchengdu on 16/1/20.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/SecondViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SecondViewController.h
3 | // UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class
4 | //
5 | // Created by huangchengdu on 16/1/20.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SecondViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/SecondViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // SecondViewController.m
3 | // UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class
4 | //
5 | // Created by huangchengdu on 16/1/20.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import "SecondViewController.h"
10 |
11 | @interface SecondViewController ()
12 |
13 | @end
14 |
15 | @implementation SecondViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | self.navigationController.navigationBarHidden = NO;
20 | // Do any additional setup after loading the view.
21 | }
22 |
23 | - (void)didReceiveMemoryWarning {
24 | [super didReceiveMemoryWarning];
25 | // Dispose of any resources that can be recreated.
26 | }
27 |
28 | /*
29 | #pragma mark - Navigation
30 |
31 | // In a storyboard-based application, you will often want to do a little preparation before navigation
32 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
33 | // Get the new view controller using [segue destinationViewController].
34 | // Pass the selected object to the new view controller.
35 | }
36 | */
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/Storyboard.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class
4 | //
5 | // Created by huangchengdu on 16/1/20.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class
4 | //
5 | // Created by huangchengdu on 16/1/20.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | self.navigationController.navigationBarHidden = YES;
20 | // Do any additional setup after loading the view, typically from a nib.
21 | }
22 |
23 | - (void)didReceiveMemoryWarning {
24 | [super didReceiveMemoryWarning];
25 | // Dispose of any resources that can be recreated.
26 | }
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class
4 | //
5 | // Created by huangchengdu on 16/1/20.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size classTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size class/UI布局(二)storyboard中autolayout和size classUI布局(二)storyboard中autolayout和size UI布局(二)storyboard中autolayout和size classUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/叶孤城Layout/AutoLayout/HCDAutoLayout/HCDAutoLayout.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/叶孤城Layout/AutoLayout/HCDAutoLayout/HCDAutoLayout.xcodeproj/project.xcworkspace/xcuserdata/yifan.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/叶孤城Layout/AutoLayout/HCDAutoLayout/HCDAutoLayout.xcodeproj/project.xcworkspace/xcuserdata/yifan.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/叶孤城Layout/AutoLayout/HCDAutoLayout/HCDAutoLayout.xcodeproj/xcuserdata/yifan.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | HCDAutoLayout.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | DDA8B4401B94559E00B17301
16 |
17 | primary
18 |
19 |
20 | DDA8B4591B94559F00B17301
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/叶孤城Layout/AutoLayout/HCDAutoLayout/HCDAutoLayout/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // HCDAutoLayout
4 | //
5 | // Created by yifan on 15/8/31.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/叶孤城Layout/AutoLayout/HCDAutoLayout/HCDAutoLayout/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/叶孤城Layout/AutoLayout/HCDAutoLayout/HCDAutoLayout/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ---.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/叶孤城Layout/AutoLayout/HCDAutoLayout/HCDAutoLayout/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // HCDAutoLayout
4 | //
5 | // Created by yifan on 15/8/31.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/叶孤城Layout/AutoLayout/HCDAutoLayout/HCDAutoLayout/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // HCDAutoLayout
4 | //
5 | // Created by yifan on 15/8/31.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/叶孤城Layout/AutoLayout/HCDAutoLayout/HCDAutoLayout/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // HCDAutoLayout
4 | //
5 | // Created by yifan on 15/8/31.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/叶孤城Layout/AutoLayout/HCDAutoLayout/HCDAutoLayoutTests/HCDAutoLayoutTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // HCDAutoLayoutTests.m
3 | // HCDAutoLayoutTests
4 | //
5 | // Created by yifan on 15/8/31.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface HCDAutoLayoutTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation HCDAutoLayoutTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/叶孤城Layout/AutoLayout/HCDAutoLayout/HCDAutoLayoutTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ---.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/叶孤城Layout/HCDAutoLayout2/HCDAutoLayout2.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/叶孤城Layout/HCDAutoLayout2/HCDAutoLayout2.xcodeproj/project.xcworkspace/xcuserdata/yifan.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/叶孤城Layout/HCDAutoLayout2/HCDAutoLayout2.xcodeproj/project.xcworkspace/xcuserdata/yifan.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/叶孤城Layout/HCDAutoLayout2/HCDAutoLayout2.xcodeproj/xcuserdata/yifan.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | HCDAutoLayout2.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | DDBC07CB1B9C2F630015B73D
16 |
17 | primary
18 |
19 |
20 | DDBC07E41B9C2F630015B73D
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/叶孤城Layout/HCDAutoLayout2/HCDAutoLayout2/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // HCDAutoLayout2
4 | //
5 | // Created by yifan on 15/9/6.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/叶孤城Layout/HCDAutoLayout2/HCDAutoLayout2/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/叶孤城Layout/HCDAutoLayout2/HCDAutoLayout2/Images.xcassets/cloud.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "cloud_small.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "cloud_small@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x",
16 | "filename" : "cloud_small@3x.png"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/叶孤城Layout/HCDAutoLayout2/HCDAutoLayout2/Images.xcassets/cloud.imageset/cloud_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/叶孤城Layout/HCDAutoLayout2/HCDAutoLayout2/Images.xcassets/cloud.imageset/cloud_small.png
--------------------------------------------------------------------------------
/叶孤城Layout/HCDAutoLayout2/HCDAutoLayout2/Images.xcassets/cloud.imageset/cloud_small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/叶孤城Layout/HCDAutoLayout2/HCDAutoLayout2/Images.xcassets/cloud.imageset/cloud_small@2x.png
--------------------------------------------------------------------------------
/叶孤城Layout/HCDAutoLayout2/HCDAutoLayout2/Images.xcassets/cloud.imageset/cloud_small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/叶孤城Layout/HCDAutoLayout2/HCDAutoLayout2/Images.xcassets/cloud.imageset/cloud_small@3x.png
--------------------------------------------------------------------------------
/叶孤城Layout/HCDAutoLayout2/HCDAutoLayout2/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ---.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/叶孤城Layout/HCDAutoLayout2/HCDAutoLayout2/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // HCDAutoLayout2
4 | //
5 | // Created by yifan on 15/9/6.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/叶孤城Layout/HCDAutoLayout2/HCDAutoLayout2/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // HCDAutoLayout2
4 | //
5 | // Created by yifan on 15/9/6.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 | #warning http://www.jianshu.com/p/3d6b2341fd83
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/叶孤城Layout/HCDAutoLayout2/HCDAutoLayout2/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // HCDAutoLayout2
4 | //
5 | // Created by yifan on 15/9/6.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/叶孤城Layout/HCDAutoLayout2/HCDAutoLayout2Tests/HCDAutoLayout2Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // HCDAutoLayout2Tests.m
3 | // HCDAutoLayout2Tests
4 | //
5 | // Created by yifan on 15/9/6.
6 | // Copyright (c) 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface HCDAutoLayout2Tests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation HCDAutoLayout2Tests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/叶孤城Layout/HCDAutoLayout2/HCDAutoLayout2Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | ---.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass 和AutoLayout教程2/SizeClass 和AutoLayout教程2.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass 和AutoLayout教程2/SizeClass 和AutoLayout教程2.xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/叶孤城Layout/SizeClass 和AutoLayout教程2/SizeClass 和AutoLayout教程2.xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass 和AutoLayout教程2/SizeClass 和AutoLayout教程2.xcodeproj/xcuserdata/huangchengdu.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | SizeClass 和AutoLayout教程2.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 4D070EAC1BE5AE8C0051557A
16 |
17 | primary
18 |
19 |
20 | 4D070EC51BE5AE8C0051557A
21 |
22 | primary
23 |
24 |
25 | 4D070ED01BE5AE8C0051557A
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass 和AutoLayout教程2/SizeClass 和AutoLayout教程2/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // SizeClass 和AutoLayout教程2
4 | //
5 | // Created by 黄成都 on 15/11/1.
6 | // Copyright © 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass 和AutoLayout教程2/SizeClass 和AutoLayout教程2/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // SizeClass 和AutoLayout教程2
4 | //
5 | // Created by 黄成都 on 15/11/1.
6 | // Copyright © 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass 和AutoLayout教程2/SizeClass 和AutoLayout教程2/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // SizeClass 和AutoLayout教程2
4 | //
5 | // Created by 黄成都 on 15/11/1.
6 | // Copyright © 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass 和AutoLayout教程2/SizeClass 和AutoLayout教程2/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // SizeClass 和AutoLayout教程2
4 | //
5 | // Created by 黄成都 on 15/11/1.
6 | // Copyright © 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass 和AutoLayout教程2/SizeClass 和AutoLayout教程2Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass 和AutoLayout教程2/SizeClass 和AutoLayout教程2Tests/SizeClass__AutoLayout__2Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // SizeClass__AutoLayout__2Tests.m
3 | // SizeClass 和AutoLayout教程2Tests
4 | //
5 | // Created by 黄成都 on 15/11/1.
6 | // Copyright © 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SizeClass__AutoLayout__2Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation SizeClass__AutoLayout__2Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass 和AutoLayout教程2/SizeClass 和AutoLayout教程2UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass和AutoLayout教程1/SizeClass和AutoLayout教程1.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass和AutoLayout教程1/SizeClass和AutoLayout教程1.xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/叶孤城Layout/SizeClass和AutoLayout教程1/SizeClass和AutoLayout教程1.xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass和AutoLayout教程1/SizeClass和AutoLayout教程1.xcodeproj/xcuserdata/huangchengdu.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | SizeClass和AutoLayout教程1.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 4D070E6D1BE5A88C0051557A
16 |
17 | primary
18 |
19 |
20 | 4D070E861BE5A88D0051557A
21 |
22 | primary
23 |
24 |
25 | 4D070E911BE5A88D0051557A
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass和AutoLayout教程1/SizeClass和AutoLayout教程1/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // SizeClass和AutoLayout教程1
4 | //
5 | // Created by 黄成都 on 15/11/1.
6 | // Copyright © 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass和AutoLayout教程1/SizeClass和AutoLayout教程1/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // SizeClass和AutoLayout教程1
4 | //
5 | // Created by 黄成都 on 15/11/1.
6 | // Copyright © 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass和AutoLayout教程1/SizeClass和AutoLayout教程1/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // SizeClass和AutoLayout教程1
4 | //
5 | // Created by 黄成都 on 15/11/1.
6 | // Copyright © 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #warning 参考博客地址:http://www.jianshu.com/p/bd071f9a558d
10 |
11 | #import "ViewController.h"
12 |
13 | @interface ViewController ()
14 |
15 | @end
16 |
17 | @implementation ViewController
18 |
19 | - (void)viewDidLoad {
20 | [super viewDidLoad];
21 | // Do any additional setup after loading the view, typically from a nib.
22 | }
23 |
24 | - (void)didReceiveMemoryWarning {
25 | [super didReceiveMemoryWarning];
26 | // Dispose of any resources that can be recreated.
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass和AutoLayout教程1/SizeClass和AutoLayout教程1/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // SizeClass和AutoLayout教程1
4 | //
5 | // Created by 黄成都 on 15/11/1.
6 | // Copyright © 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass和AutoLayout教程1/SizeClass和AutoLayout教程1Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass和AutoLayout教程1/SizeClass和AutoLayout教程1Tests/SizeClass_AutoLayout__1Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // SizeClass_AutoLayout__1Tests.m
3 | // SizeClass和AutoLayout教程1Tests
4 | //
5 | // Created by 黄成都 on 15/11/1.
6 | // Copyright © 2015年 黄成都. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SizeClass_AutoLayout__1Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation SizeClass_AutoLayout__1Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/叶孤城Layout/SizeClass和AutoLayout教程1/SizeClass和AutoLayout教程1UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(一)/开始iOS 7中自动布局教程(一).xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(一)/开始iOS 7中自动布局教程(一).xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/开始iOS 7中自动布局教程(一)/开始iOS 7中自动布局教程(一).xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(一)/开始iOS 7中自动布局教程(一).xcodeproj/xcuserdata/huangchengdu.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | 开始iOS 7中自动布局教程(一).xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 4D5BEB811C50E43900B038C9
16 |
17 | primary
18 |
19 |
20 | 4D5BEB9A1C50E43900B038C9
21 |
22 | primary
23 |
24 |
25 | 4D5BEBA51C50E43900B038C9
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(一)/开始iOS 7中自动布局教程(一)/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // 开始iOS 7中自动布局教程(一)
4 | //
5 | // Created by huangchengdu on 16/1/21.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #warning 参考博客地址:http://www.cnblogs.com/zer0Black/p/3977134.html
12 |
13 | @interface AppDelegate : UIResponder
14 |
15 | @property (strong, nonatomic) UIWindow *window;
16 |
17 |
18 | @end
19 |
20 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(一)/开始iOS 7中自动布局教程(一)/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // 开始iOS 7中自动布局教程(一)
4 | //
5 | // Created by huangchengdu on 16/1/21.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(一)/开始iOS 7中自动布局教程(一)/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // 开始iOS 7中自动布局教程(一)
4 | //
5 | // Created by huangchengdu on 16/1/21.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(一)/开始iOS 7中自动布局教程(一)/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // 开始iOS 7中自动布局教程(一)
4 | //
5 | // Created by huangchengdu on 16/1/21.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(一)/开始iOS 7中自动布局教程(一)Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(一)/开始iOS 7中自动布局教程(一)Tests/__iOS_7__________Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // __iOS_7__________Tests.m
3 | // 开始iOS 7中自动布局教程(一)Tests
4 | //
5 | // Created by huangchengdu on 16/1/21.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface __iOS_7__________Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation __iOS_7__________Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(一)/开始iOS 7中自动布局教程(一)UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(二)/开始iOS 7中自动布局教程(二).xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(二)/开始iOS 7中自动布局教程(二).xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/开始iOS 7中自动布局教程(二)/开始iOS 7中自动布局教程(二).xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(二)/开始iOS 7中自动布局教程(二).xcodeproj/xcuserdata/huangchengdu.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | 开始iOS 7中自动布局教程(二).xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 4D5BEBC01C50E87200B038C9
16 |
17 | primary
18 |
19 |
20 | 4D5BEBD91C50E87200B038C9
21 |
22 | primary
23 |
24 |
25 | 4D5BEBE41C50E87200B038C9
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(二)/开始iOS 7中自动布局教程(二)/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // 开始iOS 7中自动布局教程(二)
4 | //
5 | // Created by huangchengdu on 16/1/21.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | #warning 参考博客地址:http://www.cnblogs.com/zer0Black/p/3977288.html
13 |
14 | @interface AppDelegate : UIResponder
15 |
16 | @property (strong, nonatomic) UIWindow *window;
17 |
18 |
19 | @end
20 |
21 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(二)/开始iOS 7中自动布局教程(二)/SecondViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SecondViewController.h
3 | // 开始iOS 7中自动布局教程(二)
4 | //
5 | // Created by huangchengdu on 16/1/21.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SecondViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(二)/开始iOS 7中自动布局教程(二)/SecondViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // SecondViewController.m
3 | // 开始iOS 7中自动布局教程(二)
4 | //
5 | // Created by huangchengdu on 16/1/21.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import "SecondViewController.h"
10 |
11 | @interface SecondViewController ()
12 |
13 | @end
14 |
15 | @implementation SecondViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view from its nib.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | /*
28 | #pragma mark - Navigation
29 |
30 | // In a storyboard-based application, you will often want to do a little preparation before navigation
31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
32 | // Get the new view controller using [segue destinationViewController].
33 | // Pass the selected object to the new view controller.
34 | }
35 | */
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(二)/开始iOS 7中自动布局教程(二)/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // 开始iOS 7中自动布局教程(二)
4 | //
5 | // Created by huangchengdu on 16/1/21.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(二)/开始iOS 7中自动布局教程(二)/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // 开始iOS 7中自动布局教程(二)
4 | //
5 | // Created by huangchengdu on 16/1/21.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(二)/开始iOS 7中自动布局教程(二)/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // 开始iOS 7中自动布局教程(二)
4 | //
5 | // Created by huangchengdu on 16/1/21.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(二)/开始iOS 7中自动布局教程(二)Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(二)/开始iOS 7中自动布局教程(二)Tests/__iOS_7__________Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // __iOS_7__________Tests.m
3 | // 开始iOS 7中自动布局教程(二)Tests
4 | //
5 | // Created by huangchengdu on 16/1/21.
6 | // Copyright © 2016年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface __iOS_7__________Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation __iOS_7__________Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/开始iOS 7中自动布局教程(二)/开始iOS 7中自动布局教程(二)UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关.xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/第二章NSLayoutConstraint布局/约束相关.xcodeproj/project.xcworkspace/xcuserdata/huangchengdu.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关.xcodeproj/xcuserdata/huangchengdu.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | 约束相关.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 4DFE06851E82D03C00E853AB
16 |
17 | primary
18 |
19 |
20 | 4DFE069E1E82D03C00E853AB
21 |
22 | primary
23 |
24 |
25 | 4DFE06A91E82D03C00E853AB
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // 约束相关
4 | //
5 | // Created by huangchengdu on 17/3/22.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/FirstViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FirstViewController.h
3 | // 约束相关
4 | //
5 | // Created by huangchengdu on 17/3/22.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FirstViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/NSLayoutConstraint+ConstraintMatching.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSLayoutConstraint+ConstraintMatching.h
3 | // 约束相关
4 | //
5 | // Created by huangchengdu on 17/3/23.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSLayoutConstraint (ConstraintMatching)
12 | -(BOOL)isEqualToLayoutConstraint:(NSLayoutConstraint *)constraint;
13 | @end
14 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/NSLayoutConstraint+ConstraintMatching.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSLayoutConstraint+ConstraintMatching.m
3 | // 约束相关
4 | //
5 | // Created by huangchengdu on 17/3/23.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import "NSLayoutConstraint+ConstraintMatching.h"
10 |
11 | @implementation NSLayoutConstraint (ConstraintMatching)
12 | -(BOOL)isEqualToLayoutConstraint:(NSLayoutConstraint *)constraint{
13 | if (self.firstItem != constraint.firstItem) {
14 | return NO;
15 | }
16 | if (self.secondItem != constraint.secondItem) {
17 | return NO;
18 | }
19 | if (self.firstAttribute != constraint.firstAttribute) {
20 | return NO;
21 | }
22 | if (self.secondAttribute != constraint.secondAttribute) {
23 | return NO;
24 | }
25 | if (self.relation != constraint.relation) {
26 | return NO;
27 | }
28 | if (self.multiplier != constraint.multiplier) {
29 | return NO;
30 | }
31 | if (self.constant != constraint.constant) {
32 | return NO;
33 | }
34 | return YES;
35 | }
36 | @end
37 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/NSLayoutConstraint+SelfInstall.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSLayoutConstraint+SelfInstall.h
3 | // 约束相关
4 | //
5 | // Created by huangchengdu on 17/3/23.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSLayoutConstraint (SelfInstall)
12 | -(BOOL)install;
13 | -(BOOL)install:(float)priority;
14 | -(void)remove;
15 | @end
16 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/NSLayoutConstraint+SelfInstall.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSLayoutConstraint+SelfInstall.m
3 | // 约束相关
4 | //
5 | // Created by huangchengdu on 17/3/23.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import "NSLayoutConstraint+SelfInstall.h"
10 | #import "NSLayoutConstraint+ViewHierarchy.h"
11 | #import "UIView+HierarchySupport.h"
12 | @implementation NSLayoutConstraint (SelfInstall)
13 | -(BOOL)install{
14 | if ([self isUnary]) {
15 | [self.firstView addConstraint:self];
16 | return YES;
17 | }
18 | UIView *view = [self.firstView nearestCommonAncestorToView:self.secondView];
19 | if (!view) {
20 | return NO;
21 | }
22 | [view addConstraint:self];
23 | return YES;
24 | }
25 |
26 | -(BOOL)isUnary{
27 | if (self.secondView) {
28 | return false;
29 | }
30 | return true;
31 | }
32 | -(BOOL)install:(float)priority{
33 | self.priority = priority;
34 | return [self install];
35 | }
36 |
37 | -(void)remove{
38 | if ([self isUnary]) {
39 | UIView *view = [self firstView];
40 | [view removeConstraint:self];
41 | return;
42 | }
43 | UIView *view = [self.firstView nearestCommonAncestorToView:self.secondView];
44 | if (!view) {
45 | return;
46 | }
47 | [view removeConstraint:self];
48 | }
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/NSLayoutConstraint+ViewHierarchy.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSLayoutConstraint+ViewHierarchy.h
3 | // 约束相关
4 | //
5 | // Created by huangchengdu on 17/3/23.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSLayoutConstraint (ViewHierarchy)
12 | @property(nonatomic,readonly)UIView *firstView;
13 | @property(nonatomic,readonly)UIView *secondView;
14 | @end
15 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/NSLayoutConstraint+ViewHierarchy.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSLayoutConstraint+ViewHierarchy.m
3 | // 约束相关
4 | //
5 | // Created by huangchengdu on 17/3/23.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import "NSLayoutConstraint+ViewHierarchy.h"
10 |
11 | @implementation NSLayoutConstraint (ViewHierarchy)
12 | -(UIView *)firstView{
13 | return self.firstItem;
14 | }
15 | -(UIView *)secondView{
16 | return self.secondItem;
17 | }
18 | @end
19 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/SecondViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SecondViewController.h
3 | // 约束相关
4 | //
5 | // Created by huangchengdu on 17/3/23.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SecondViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/SecondViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // SecondViewController.m
3 | // 约束相关
4 | //
5 | // Created by huangchengdu on 17/3/23.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import "SecondViewController.h"
10 |
11 | @interface SecondViewController ()
12 |
13 | @end
14 |
15 | @implementation SecondViewController
16 |
17 | -(void)awakeFromNib{
18 | [super awakeFromNib];
19 |
20 | }
21 |
22 | - (void)viewDidLoad {
23 | [super viewDidLoad];
24 | UIImage *image = [[UIImage imageNamed:@"a.png"] imageWithAlignmentRectInsets:UIEdgeInsetsMake(0, 0, 50, 20)];
25 | UIImageView *imageView = [[UIImageView alloc]initWithImage:image];
26 | imageView.frame = CGRectMake(0, 64, 100, 100);
27 | imageView.backgroundColor = [UIColor greenColor];
28 | NSLog(@"%@------%@",NSStringFromCGRect(imageView.frame),NSStringFromCGSize(imageView.intrinsicContentSize));
29 | [self.view addSubview:imageView];
30 |
31 | }
32 |
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/UIView+ConstraintMatching.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+ConstraintMatching.h
3 | // 约束相关
4 | //
5 | // Created by huangchengdu on 17/3/23.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIView (ConstraintMatching)
12 | //找到第一个匹配的约束
13 | -(NSLayoutConstraint *)constraintMatching:(NSLayoutConstraint *)aConstraint;
14 | //匹配约束组的约束
15 | -(NSArray *)constraintsMatchingConstraints:(NSArray *)constraints;
16 | -(void)removeMatchingConstraint:(NSLayoutConstraint *)aConstraint;
17 | -(void)removeMatchingConstraints:(NSArray *)aArray;
18 | @end
19 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/UIView+ConstraintMatching.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+ConstraintMatching.m
3 | // 约束相关
4 | //
5 | // Created by huangchengdu on 17/3/23.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import "UIView+ConstraintMatching.h"
10 |
11 | @implementation UIView (ConstraintMatching)
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/UIView+HierarchySupport.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+HierarchySupport.h
3 | // 约束相关
4 | //
5 | // Created by huangchengdu on 17/3/23.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIView (HierarchySupport)
12 | -(NSArray *)superviews;
13 | -(BOOL)isAncestorOfView:(UIView *)aView;
14 | -(UIView *)nearestCommonAncestorToView:(UIView *)aView;
15 | @end
16 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/UIView+HierarchySupport.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+HierarchySupport.m
3 | // 约束相关
4 | //
5 | // Created by huangchengdu on 17/3/23.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import "UIView+HierarchySupport.h"
10 |
11 | @implementation UIView (HierarchySupport)
12 | -(NSArray *)superviews{
13 | NSMutableArray *array = [NSMutableArray new];
14 | UIView *view = self.superview;
15 | if (view) {
16 | [array addObject:view];
17 | view = view.superview;
18 | }
19 | return array;
20 | }
21 | -(BOOL)isAncestorOfView:(UIView *)aView{
22 |
23 | return [[self superviews] containsObject:self];
24 | }
25 |
26 | -(UIView *)nearestCommonAncestorToView:(UIView *)aView{
27 | if ([self isEqual:aView]) {
28 | return self;
29 | }
30 | if ([self isAncestorOfView:aView]) {
31 | return self;
32 | }
33 | if ([aView isAncestorOfView:self]) {
34 | return aView;
35 | }
36 | NSArray *ancestor = [self superviews];
37 | for (UIView *view in [aView superviews]) {
38 | if ([ancestor containsObject:view]) {
39 | return view;
40 | }
41 | }
42 | return nil;
43 |
44 | }
45 | @end
46 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/UIView+Layout.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+Layout.h
3 | // 约束相关
4 | //
5 | // Created by huangchengdu on 17/3/23.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIView (Layout)
12 | -(void)testAmbiguity;
13 | -(NSArray *)allConstraints;
14 | @end
15 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/UIView+Layout.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+Layout.m
3 | // 约束相关
4 | //
5 | // Created by huangchengdu on 17/3/23.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import "UIView+Layout.h"
10 |
11 | @implementation UIView (Layout)
12 | -(void)testAmbiguity{
13 | NSLog(@"<%@:0x%0x>: %@",self.class.description,(int)self,self.hasAmbiguousLayout?@"约束不充分":@"约束完整");
14 | for (UIView *view in self.subviews) {
15 | [view testAmbiguity];
16 | }
17 | }
18 |
19 | -(NSArray *)allConstraints{
20 | NSMutableArray *arr = [NSMutableArray new];
21 | [arr addObjectsFromArray:self.constraints];
22 | for (UIView *view in self.subviews) {
23 | [arr addObjectsFromArray:view.constraints];
24 | }
25 | return arr;
26 | }
27 | @end
28 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // 约束相关
4 | //
5 | // Created by huangchengdu on 17/3/22.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // 约束相关
4 | //
5 | // Created by huangchengdu on 17/3/22.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "FirstViewController.h"
11 | #import "SecondViewController.h"
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 |
21 | }
22 |
23 |
24 | - (IBAction)one:(id)sender {
25 | [self.navigationController pushViewController:[[FirstViewController alloc]init] animated:YES];
26 | }
27 |
28 | - (IBAction)two:(id)sender {
29 | [self.navigationController pushViewController:[[SecondViewController alloc]init] animated:YES];
30 | }
31 |
32 | - (IBAction)three:(id)sender {
33 | }
34 |
35 | - (IBAction)four:(id)sender {
36 | }
37 |
38 | - (IBAction)five:(id)sender {
39 | }
40 |
41 | - (IBAction)six:(id)sender {
42 | }
43 |
44 | - (IBAction)seven:(id)sender {
45 | }
46 |
47 | - (IBAction)eight:(id)sender {
48 | }
49 |
50 | - (IBAction)nine:(id)sender {
51 | }
52 |
53 |
54 |
55 |
56 |
57 | @end
58 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/第二章NSLayoutConstraint布局/约束相关/a.png
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // 约束相关
4 | //
5 | // Created by huangchengdu on 17/3/22.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关Tests/____Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // ____Tests.m
3 | // 约束相关Tests
4 | //
5 | // Created by huangchengdu on 17/3/22.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ____Tests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation ____Tests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关UITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/第二章NSLayoutConstraint布局/约束相关UITests/____UITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // ____UITests.m
3 | // 约束相关UITests
4 | //
5 | // Created by huangchengdu on 17/3/22.
6 | // Copyright © 2017年 huangchengdu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ____UITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation ____UITests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 |
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 |
22 | // In UI tests it is usually best to stop immediately when a failure occurs.
23 | self.continueAfterFailure = NO;
24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
25 | [[[XCUIApplication alloc] init] launch];
26 |
27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
28 | }
29 |
30 | - (void)tearDown {
31 | // Put teardown code here. This method is called after the invocation of each test method in the class.
32 | [super tearDown];
33 | }
34 |
35 | - (void)testExample {
36 | // Use recording to get started writing UI tests.
37 | // Use XCTAssert and related functions to verify your tests produce the correct results.
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo.xcodeproj/project.xcworkspace/xcuserdata/tangxp.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/自动布局计算cell高度的各种情况/CellHeightDemo.xcodeproj/project.xcworkspace/xcuserdata/tangxp.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo.xcodeproj/project.xcworkspace/xcuserdata/tangxp.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges
6 |
7 | SnapshotAutomaticallyBeforeSignificantChanges
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo.xcodeproj/project.xcworkspace/xcuserdata/yifan.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/自动布局计算cell高度的各种情况/CellHeightDemo.xcodeproj/project.xcworkspace/xcuserdata/yifan.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo.xcodeproj/xcuserdata/tangxp.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo.xcodeproj/xcuserdata/tangxp.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | CellHeightDemo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 4BEBE78718B59C0E00D674F5
16 |
17 | primary
18 |
19 |
20 | 4BEBE7A818B59C0E00D674F5
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo.xcodeproj/xcuserdata/yifan.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | CellHeightDemo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 4BEBE78718B59C0E00D674F5
16 |
17 | primary
18 |
19 |
20 | 4BEBE7A818B59C0E00D674F5
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // CellHeightDemo
4 | //
5 | // Created by Haven on 20/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/BaseViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // BaseViewController.h
3 | // CellHeightDemo
4 | //
5 | // Created by Haven on 20/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface BaseViewController : UITableViewController
12 |
13 | @property (nonatomic, strong) UITableViewCell *prototypeCell;
14 | @property (nonatomic, strong) NSArray *tableData;
15 | @end
16 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/CellHeightDemo-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | com.lf.celldemo
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/CellHeightDemo-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_5_0
10 | #warning "This project uses features only available in iOS SDK 5.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/Cells/C1.h:
--------------------------------------------------------------------------------
1 | //
2 | // C1.h
3 | // CellHigthDemo
4 | //
5 | // Created by Haven on 19/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface C1 : UITableViewCell
12 |
13 | @property (weak, nonatomic) IBOutlet UIImageView *i;
14 | @property (weak, nonatomic) IBOutlet UILabel *t;
15 | @end
16 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/Cells/C1.m:
--------------------------------------------------------------------------------
1 | //
2 | // C1.m
3 | // CellHigthDemo
4 | //
5 | // Created by Haven on 19/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import "C1.h"
10 | #import "NSLayoutConstraint+ClassMethodPriority.h"
11 |
12 | @implementation C1
13 |
14 |
15 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
16 | {
17 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
18 | if (self) {
19 | // Initialization code
20 |
21 | }
22 | return self;
23 | }
24 |
25 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated
26 | {
27 | [super setSelected:selected animated:animated];
28 |
29 | // Configure the view for the selected state
30 | }
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/Cells/C2.h:
--------------------------------------------------------------------------------
1 | //
2 | // C2.h
3 | // CellHeightDemo
4 | //
5 | // Created by Haven on 21/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface C2 : UITableViewCell
12 | @property (weak, nonatomic) IBOutlet UITextView *t;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/Cells/C2.m:
--------------------------------------------------------------------------------
1 | //
2 | // C2.m
3 | // CellHeightDemo
4 | //
5 | // Created by Haven on 21/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import "C2.h"
10 |
11 | @implementation C2
12 |
13 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
14 | {
15 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
16 | if (self) {
17 | // Initialization code
18 | }
19 | return self;
20 | }
21 |
22 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated
23 | {
24 | [super setSelected:selected animated:animated];
25 |
26 | // Configure the view for the selected state
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/Cells/C3.h:
--------------------------------------------------------------------------------
1 | //
2 | // C3.h
3 | // CellHeightDemo
4 | //
5 | // Created by Haven on 20/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface C3 : UITableViewCell
12 | @property (weak, nonatomic) IBOutlet UILabel *t;
13 | @property (weak, nonatomic) IBOutlet UIImageView *i;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/Cells/C3.m:
--------------------------------------------------------------------------------
1 | //
2 | // C3.m
3 | // CellHeightDemo
4 | //
5 | // Created by Haven on 20/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import "C3.h"
10 |
11 | @implementation C3
12 |
13 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
14 | {
15 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
16 | if (self) {
17 | // Initialization code
18 | }
19 | return self;
20 | }
21 |
22 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated
23 | {
24 | [super setSelected:selected animated:animated];
25 |
26 | // Configure the view for the selected state
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/Cells/C4.h:
--------------------------------------------------------------------------------
1 | //
2 | // C4.h
3 | // CellHeightDemo
4 | //
5 | // Created by Haven on 21/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface C4 : UITableViewCell
12 | @property (weak, nonatomic) IBOutlet UIImageView *i;
13 | @property (weak, nonatomic) IBOutlet UITextView *t;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/Cells/C4.m:
--------------------------------------------------------------------------------
1 | //
2 | // C4.m
3 | // CellHeightDemo
4 | //
5 | // Created by Haven on 21/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import "C4.h"
10 |
11 | @implementation C4
12 |
13 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
14 | {
15 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
16 | if (self) {
17 | // Initialization code
18 | }
19 | return self;
20 | }
21 |
22 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated
23 | {
24 | [super setSelected:selected animated:animated];
25 |
26 | // Configure the view for the selected state
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/Cells/C5.h:
--------------------------------------------------------------------------------
1 | //
2 | // C5.h
3 | // CellHeightDemo
4 | //
5 | // Created by Haven on 21/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface C5 : UITableViewCell
12 |
13 | @property (weak, nonatomic) IBOutlet UITextView *t;
14 | @end
15 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/Cells/C5.m:
--------------------------------------------------------------------------------
1 | //
2 | // C5.m
3 | // CellHeightDemo
4 | //
5 | // Created by Haven on 21/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import "C5.h"
10 |
11 | @implementation C5
12 |
13 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
14 | {
15 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
16 | if (self) {
17 | // Initialization code
18 | }
19 | return self;
20 | }
21 |
22 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated
23 | {
24 | [super setSelected:selected animated:animated];
25 |
26 | // Configure the view for the selected state
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "8.0",
8 | "subtype" : "736h",
9 | "scale" : "3x"
10 | },
11 | {
12 | "orientation" : "landscape",
13 | "idiom" : "iphone",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "8.0",
16 | "subtype" : "736h",
17 | "scale" : "3x"
18 | },
19 | {
20 | "orientation" : "portrait",
21 | "idiom" : "iphone",
22 | "extent" : "full-screen",
23 | "minimum-system-version" : "8.0",
24 | "subtype" : "667h",
25 | "scale" : "2x"
26 | },
27 | {
28 | "orientation" : "portrait",
29 | "idiom" : "iphone",
30 | "extent" : "full-screen",
31 | "minimum-system-version" : "7.0",
32 | "scale" : "2x"
33 | },
34 | {
35 | "orientation" : "portrait",
36 | "idiom" : "iphone",
37 | "extent" : "full-screen",
38 | "minimum-system-version" : "7.0",
39 | "subtype" : "retina4",
40 | "scale" : "2x"
41 | }
42 | ],
43 | "info" : {
44 | "version" : 1,
45 | "author" : "xcode"
46 | }
47 | }
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/NSLayoutConstraint+ClassMethodPriority.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSLayoutConstraint+ClassMethodPriority.h
3 | // DynamicCellHeights
4 | //
5 | // Copyright (c) 2013 John Szumski. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | @interface NSLayoutConstraint (ClassMethodPriority)
11 |
12 | + (id)constraintWithItem:(id)view1
13 | attribute:(NSLayoutAttribute)attr1
14 | relatedBy:(NSLayoutRelation)relation
15 | toItem:(id)view2
16 | attribute:(NSLayoutAttribute)attr2
17 | multiplier:(CGFloat)multiplier
18 | constant:(CGFloat)c
19 | priority:(UILayoutPriority)priority;
20 |
21 | @end
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/NSLayoutConstraint+ClassMethodPriority.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSLayoutConstraint+ClassMethodPriority.m
3 | // DynamicCellHeights
4 | //
5 | // Copyright (c) 2013 John Szumski. All rights reserved.
6 | //
7 |
8 | #import "NSLayoutConstraint+ClassMethodPriority.h"
9 |
10 | @implementation NSLayoutConstraint (ClassMethodPriority)
11 |
12 | + (id)constraintWithItem:(id)view1
13 | attribute:(NSLayoutAttribute)attr1
14 | relatedBy:(NSLayoutRelation)relation
15 | toItem:(id)view2
16 | attribute:(NSLayoutAttribute)attr2
17 | multiplier:(CGFloat)multiplier
18 | constant:(CGFloat)c
19 | priority:(UILayoutPriority)priority {
20 |
21 | NSLayoutConstraint *constraint = [NSLayoutConstraint constraintWithItem:view1
22 | attribute:attr1
23 | relatedBy:relation
24 | toItem:view2
25 | attribute:attr2
26 | multiplier:multiplier
27 | constant:c];
28 | constraint.priority = priority;
29 |
30 | return constraint;
31 | }
32 |
33 | @end
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/NSString+Ext.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+Ext.h
3 | // v2ex
4 | //
5 | // Created by Haven on 18/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSString (Ext)
12 | - (CGSize)calculateSize:(CGSize)size font:(UIFont *)font;
13 | @end
14 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/NSString+Ext.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+Ext.m
3 | // v2ex
4 | //
5 | // Created by Haven on 18/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import "NSString+Ext.h"
10 |
11 | @implementation NSString (Ext)
12 | - (CGSize)calculateSize:(CGSize)size font:(UIFont *)font {
13 | CGSize expectedLabelSize = CGSizeZero;
14 |
15 | if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
16 | NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
17 | paragraphStyle.lineBreakMode = NSLineBreakByWordWrapping;
18 | NSDictionary *attributes = @{NSFontAttributeName:font, NSParagraphStyleAttributeName:paragraphStyle.copy};
19 |
20 | expectedLabelSize = [self boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:attributes context:nil].size;
21 | }
22 | else {
23 | expectedLabelSize = [self sizeWithFont:font
24 | constrainedToSize:size
25 | lineBreakMode:NSLineBreakByWordWrapping];
26 | }
27 |
28 | return CGSizeMake(ceil(expectedLabelSize.width), ceil(expectedLabelSize.height));
29 | }
30 | @end
31 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/T1ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // T1ViewController.h
3 | // CellHeightDemo
4 | //
5 | // Created by Haven on 20/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "BaseViewController.h"
11 |
12 | @interface T1ViewController : BaseViewController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/T2ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // T2ViewController.h
3 | // CellHeightDemo
4 | //
5 | // Created by Haven on 20/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "BaseViewController.h"
11 |
12 | @interface T2ViewController : BaseViewController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/T3ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // T3ViewController.h
3 | // CellHeightDemo
4 | //
5 | // Created by Haven on 20/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "BaseViewController.h"
11 |
12 | @interface T3ViewController : BaseViewController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/T4ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // T4ViewController.h
3 | // CellHeightDemo
4 | //
5 | // Created by Haven on 20/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "BaseViewController.h"
11 |
12 | @interface T4ViewController : BaseViewController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/T5ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // T5ViewController.h
3 | // CellHeightDemo
4 | //
5 | // Created by Haven on 21/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "BaseViewController.h"
11 |
12 | @interface T5ViewController : BaseViewController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // CellHeightDemo
4 | //
5 | // Created by Haven on 20/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // CellHeightDemo
4 | //
5 | // Created by Haven on 20/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad
18 | {
19 | [super viewDidLoad];
20 | // Do any additional setup after loading the view, typically from a nib.
21 | }
22 |
23 | - (void)didReceiveMemoryWarning
24 | {
25 | [super didReceiveMemoryWarning];
26 | // Dispose of any resources that can be recreated.
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/img.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MyGitHubFork/UILayoutOfiOS/d6f215d32f3562821674a69b9c20d6cfc44c6dc2/自动布局计算cell高度的各种情况/CellHeightDemo/img.png
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // CellHeightDemo
4 | //
5 | // Created by Haven on 20/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char * argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemoTests/CellHeightDemoTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.lf.extobjc.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemoTests/CellHeightDemoTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // CellHeightDemoTests.m
3 | // CellHeightDemoTests
4 | //
5 | // Created by Haven on 20/2/14.
6 | // Copyright (c) 2014 LF. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CellHeightDemoTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation CellHeightDemoTests
16 |
17 | - (void)setUp
18 | {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown
24 | {
25 | // Put teardown code here. This method is called after the invocation of each test method in the class.
26 | [super tearDown];
27 | }
28 |
29 | - (void)testExample
30 | {
31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/自动布局计算cell高度的各种情况/CellHeightDemoTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------