From 230e559ba9ca4df95ad4422ee567e4ff661f5916 Mon Sep 17 00:00:00 2001 From: Takuma Osada Date: Mon, 6 May 2019 10:38:55 +0900 Subject: [PATCH] install instantiate --- Cartfile | 3 +- Cartfile.resolved | 1 + Carthage/Checkouts/Instantiate/.gitignore | 38 + Carthage/Checkouts/Instantiate/.swift-version | 1 + Carthage/Checkouts/Instantiate/.travis.yml | 10 + .../Instantiate.playground/Contents.swift | 20 + .../Resources/PlaygroundView.nib | Bin 0 -> 7261 bytes .../Resources/PlaygroundView.xib | 65 ++ .../Sources/PlaygroundView.swift | 6 + .../contents.xcplayground | 4 + .../timeline.xctimeline | 6 + .../Checkouts/Instantiate/Instantiate.podspec | 19 + .../InstantiateStandard_Info.plist | 26 + .../InstantiateTestsResource_Info.plist | 26 + .../InstantiateTestsResource_iOS_Info.plist | 25 + .../InstantiateTestsResource_macOS_Info.plist | 25 + .../InstantiateTests_Info.plist | 25 + .../Instantiate_Info.plist | 26 + .../iOSTestsResource_Info.plist | 25 + .../Instantiate.xcodeproj/iOSTests_Info.plist | 25 + .../macOSTestsResource_Info.plist | 25 + .../macOSTests_Info.plist | 25 + .../Instantiate.xcodeproj/project.pbxproj | 765 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcschemes/Instantiate.xcscheme | 95 +++ .../xcschemes/InstantiateStandard.xcscheme | 80 ++ .../xcschemes/xcschememanagement.plist | 12 + .../Instantiate/InstantiateStandard.podspec | 20 + Carthage/Checkouts/Instantiate/LICENSE | 21 + Carthage/Checkouts/Instantiate/Package.swift | 22 + Carthage/Checkouts/Instantiate/Readme.md | 65 ++ .../Sources/Instantiate/Deprecated.swift | 115 +++ .../Sources/Instantiate/Identifier.swift | 29 + .../Sources/Instantiate/Injectable.swift | 20 + .../Sources/Instantiate/Instantiatable.swift | 26 + .../Instantiate/Sources/Instantiate/Nib.swift | 94 +++ .../Sources/Instantiate/Reusable.swift | 22 + .../Sources/Instantiate/Storyboard.swift | 61 ++ .../Instantiate/ViewLoadBeforeInject.swift | 14 + .../Sources/Instantiate/iOS/Nib+UIView.swift | 47 ++ .../iOS/Nib+UIViewController.swift | 26 + .../iOS/Reusable+UICollectionView.swift | 61 ++ .../iOS/Reusable+UITableView.swift | 61 ++ .../iOS/Storyboard+UIViewController.swift | 29 + .../Instantiate/macOS/Nib+NSView.swift | 48 ++ .../macOS/Nib+NSViewController.swift | 25 + .../macOS/Reusable+NSCollectionView.swift | 59 ++ .../macOS/Reusable+NSTableView.swift | 32 + .../macOS/Storyboard+NSViewController.swift | 29 + .../InstantiateStandard/Deprecated.swift | 14 + .../InstantiateStandard/Extensions.swift | 67 ++ .../InstantiateTests/CopyBundleResources.sh | 24 + .../InstantiateTests/InstantiateTests.swift | 180 +++++ .../iOS/CollectionReusableView.xib | 37 + .../iOS/CollectionViewCell.xib | 37 + .../iOS/NibViewController.xib | 33 + .../InstantiateTests/iOS/Resources-iOS.swift | 218 +++++ .../InstantiateTests/iOS/SubclassView.xib | 29 + .../InstantiateTests/iOS/TableViewCell.xib | 36 + .../InstantiateTests/iOS/TableViewHeader.xib | 39 + .../Tests/InstantiateTests/iOS/View.xib | 29 + .../iOS/ViewController.storyboard | 163 ++++ .../macOS/CollectionReusableView.xib | 30 + .../macOS/CollectionViewCell.xib | 32 + .../macOS/NibViewController.xib | 33 + .../macOS/Resources-macOS.swift | 196 +++++ .../InstantiateTests/macOS/SubclassView.xib | 22 + .../InstantiateTests/macOS/TableViewCell.xib | 30 + .../Tests/InstantiateTests/macOS/View.xib | 22 + .../macOS/ViewController.storyboard | 185 +++++ .../tvOS/CollectionReusableView.xib | 31 + .../tvOS/CollectionViewCell.xib | 36 + .../tvOS/NibViewController.xib | 33 + .../tvOS/Resoources-tvOS.swift | 218 +++++ .../InstantiateTests/tvOS/SubclassView.xib | 26 + .../InstantiateTests/tvOS/TableViewCell.xib | 35 + .../InstantiateTests/tvOS/TableViewHeader.xib | 31 + .../Tests/InstantiateTests/tvOS/View.xib | 26 + .../tvOS/ViewController.storyboard | 152 ++++ .../Instantiate/Tests/LinuxMain.swift | 6 + sampleAppStore.xcodeproj/project.pbxproj | 10 + .../View/Today/Cell/TodayCell.swift | 2 + 83 files changed, 4380 insertions(+), 1 deletion(-) create mode 100644 Carthage/Checkouts/Instantiate/.gitignore create mode 100644 Carthage/Checkouts/Instantiate/.swift-version create mode 100644 Carthage/Checkouts/Instantiate/.travis.yml create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.playground/Contents.swift create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.playground/Resources/PlaygroundView.nib create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.playground/Resources/PlaygroundView.xib create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.playground/Sources/PlaygroundView.swift create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.playground/contents.xcplayground create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.playground/timeline.xctimeline create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.podspec create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateStandard_Info.plist create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateTestsResource_Info.plist create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateTestsResource_iOS_Info.plist create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateTestsResource_macOS_Info.plist create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateTests_Info.plist create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/Instantiate_Info.plist create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/iOSTestsResource_Info.plist create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/iOSTests_Info.plist create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/macOSTestsResource_Info.plist create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/macOSTests_Info.plist create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/project.pbxproj create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/xcshareddata/xcschemes/Instantiate.xcscheme create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/xcshareddata/xcschemes/InstantiateStandard.xcscheme create mode 100644 Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist create mode 100644 Carthage/Checkouts/Instantiate/InstantiateStandard.podspec create mode 100644 Carthage/Checkouts/Instantiate/LICENSE create mode 100644 Carthage/Checkouts/Instantiate/Package.swift create mode 100644 Carthage/Checkouts/Instantiate/Readme.md create mode 100644 Carthage/Checkouts/Instantiate/Sources/Instantiate/Deprecated.swift create mode 100644 Carthage/Checkouts/Instantiate/Sources/Instantiate/Identifier.swift create mode 100644 Carthage/Checkouts/Instantiate/Sources/Instantiate/Injectable.swift create mode 100644 Carthage/Checkouts/Instantiate/Sources/Instantiate/Instantiatable.swift create mode 100644 Carthage/Checkouts/Instantiate/Sources/Instantiate/Nib.swift create mode 100644 Carthage/Checkouts/Instantiate/Sources/Instantiate/Reusable.swift create mode 100644 Carthage/Checkouts/Instantiate/Sources/Instantiate/Storyboard.swift create mode 100644 Carthage/Checkouts/Instantiate/Sources/Instantiate/ViewLoadBeforeInject.swift create mode 100644 Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Nib+UIView.swift create mode 100644 Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Nib+UIViewController.swift create mode 100644 Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Reusable+UICollectionView.swift create mode 100644 Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Reusable+UITableView.swift create mode 100644 Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Storyboard+UIViewController.swift create mode 100644 Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Nib+NSView.swift create mode 100644 Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Nib+NSViewController.swift create mode 100644 Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Reusable+NSCollectionView.swift create mode 100644 Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Reusable+NSTableView.swift create mode 100644 Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Storyboard+NSViewController.swift create mode 100644 Carthage/Checkouts/Instantiate/Sources/InstantiateStandard/Deprecated.swift create mode 100644 Carthage/Checkouts/Instantiate/Sources/InstantiateStandard/Extensions.swift create mode 100755 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/CopyBundleResources.sh create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/InstantiateTests.swift create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/CollectionReusableView.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/CollectionViewCell.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/NibViewController.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/Resources-iOS.swift create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/SubclassView.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/TableViewCell.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/TableViewHeader.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/View.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/ViewController.storyboard create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/CollectionReusableView.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/CollectionViewCell.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/NibViewController.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/Resources-macOS.swift create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/SubclassView.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/TableViewCell.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/View.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/ViewController.storyboard create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/CollectionReusableView.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/CollectionViewCell.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/NibViewController.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/Resoources-tvOS.swift create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/SubclassView.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/TableViewCell.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/TableViewHeader.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/View.xib create mode 100644 Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/ViewController.storyboard create mode 100644 Carthage/Checkouts/Instantiate/Tests/LinuxMain.swift diff --git a/Cartfile b/Cartfile index 5aef6ea..f620ae6 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1,2 @@ -github "SDWebImage/SDWebImage" \ No newline at end of file +github "SDWebImage/SDWebImage" +github "takumaosada/Instantiate" "update/swift5" \ No newline at end of file diff --git a/Cartfile.resolved b/Cartfile.resolved index 7b485c4..cae4d29 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1 +1,2 @@ github "SDWebImage/SDWebImage" "5.0.2" +github "takumaosada/Instantiate" "a839bb579218d2c7a4bc8c4bb77987d3ca11b1df" diff --git a/Carthage/Checkouts/Instantiate/.gitignore b/Carthage/Checkouts/Instantiate/.gitignore new file mode 100644 index 0000000..db2dc93 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/.gitignore @@ -0,0 +1,38 @@ +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/ + +# SPM +.DS_Store +/.build +/Packages diff --git a/Carthage/Checkouts/Instantiate/.swift-version b/Carthage/Checkouts/Instantiate/.swift-version new file mode 100644 index 0000000..5186d07 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/.swift-version @@ -0,0 +1 @@ +4.0 diff --git a/Carthage/Checkouts/Instantiate/.travis.yml b/Carthage/Checkouts/Instantiate/.travis.yml new file mode 100644 index 0000000..ea60c28 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/.travis.yml @@ -0,0 +1,10 @@ +matrix: + include: + - os: osx + language: objective-c + osx_image: xcode9 +script: + - set -o pipefail + - xcodebuild test -scheme Instantiate -configuration Debug -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 8" | xcpretty -c + - xcodebuild test -scheme Instantiate -configuration Debug -sdk macosx | xcpretty -c + - xcodebuild test -scheme Instantiate -configuration Debug -sdk appletvsimulator -destination "platform=tvOS Simulator,name=Apple TV 1080p" | xcpretty -c diff --git a/Carthage/Checkouts/Instantiate/Instantiate.playground/Contents.swift b/Carthage/Checkouts/Instantiate/Instantiate.playground/Contents.swift new file mode 100644 index 0000000..0f531ed --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.playground/Contents.swift @@ -0,0 +1,20 @@ +//: Playground - noun: a place where people can play + +import AppKit +import PlaygroundSupport +import Instantiate +import InstantiateStandard + +extension PlaygroundView: NibInstantiatable { + public struct Dependency { + var title: String + var body: String + } + public func inject(_ dependency: Dependency) { + self.titleLabel.stringValue = dependency.title + self.textView.string = dependency.body + } +} + +let playgroundView = PlaygroundView(with: .init(title: "Hello world", body: "Wellcome to Instantiate Playground!\nThis is simple example.")) +PlaygroundPage.current.liveView = playgroundView diff --git a/Carthage/Checkouts/Instantiate/Instantiate.playground/Resources/PlaygroundView.nib b/Carthage/Checkouts/Instantiate/Instantiate.playground/Resources/PlaygroundView.nib new file mode 100644 index 0000000000000000000000000000000000000000..9dde6d6253f2b659011083b8bd0e427e9959409f GIT binary patch literal 7261 zcmaJl2Y6If*5}-*ZzePIro2Z{A&`IsLr6jkMMy#nAS9GYLJ^FUFu7n)<`&! z%+Egv2n=jx(5spO{WXI~3Y4yp(!t7AIz9~%8RoTf{s}FGfwmtG% zuz?*0LKbAhaL9u~7za~e4$OslFdv#B0xi%9YhXQG0vq94xDK|!O>hhBfSqtV+zt1` z%Wwcbg`@Bz{0D95MHTzw0L;c=n2Y&18fW2bTmV~fA)b%5*nk=~VGBmF4cl=QUWgpm z;YPd+i}4EFj926Jcmv*qx8SYVg%99^_z*sV&*F3VJidr;;6Z#F-^KUw1NKgOlAF8e>Q++v1~S$jb{_sEEa+$xRKfLJJ`%tu$8QhwX;>M1218#Stnb=E@Yft z#MZG(snCX_%aOocKy2g+d@Ooth8F3f~kP(i=5Yh^$28xJ=UkVuali0)vjZbeuVS|FuX zYHi7RTB0=;ZP4PivR9}|TS-DsB;%oQG?^fhR+L9VjR_*DGF(>`OVu}(hTecnM1+VhNhM=(EfHQ7jy6_=63w;pkjh{c39me?MH)&X;l^l-79~;E zCy8Y(nW!;BmM+risYcR5osH1R9L2l-_G5MW`Aqp{)Ln|zYI3yqmDH7C5XoGfG1s$+jm^(4jtt`@E zG9HTv(UMe%x7JuZsgqM0s&6*LKQ$JK2~`S4^k*^;agI0<0iXw5q0cNsG3n$C?&AvY z&%Hjm*bLRWRUU*3fx|^a+FJM%tb>b5qQWf5a+d1E(7SNKtm5IIf4t@Z_wzul?8_@@ zZ6#M}Pb9UL>KWyP+3=(da48)U?_IC~a^57^m%-(51zZW6;40V*SHm@eT|vG8Eoc?b z!Pb!OJ5xi+P$bqUmdFnDCEkzsk*!?ieQOMSi|Y*m>8o$R^#tDsH^7asiH^)~3MaLS z{JgQt#ETU)GpZiYx1_~_H@rLGPTd!K z%t^?7C)@#lhPxn#cq`FEvY1U9t3k(ZxF@YU-3WKVZrB6&!hMiK3h!3G;as$@$ICyE zz3>1$2oI5K?IoTc?s2V0;8BVx`^do_gU8_s_zOHqzfZx_Jx=yK{0&}!{p4yd=_FT# z8l&N*ZuNAWTo?FGe{47K%|q*K#> zITff3PNV3UifiO=F`{4BkvAQ3grb88UDEB>h0}hgu-XtlB;B$z=&s!9LN=Q0~;cbf7li&!v2i5Qa zd`RJ^8a{!UB=^#3x~}P|-iVv@R2HjGOJr&)o`@0OS)^2oC@my6ib#?6l7?lJa}sIa zGa?9|LH3$OV>+Kj!SGzK1QPuZ=2WDJT=E%=-42szJ@;LDI|iS_7w{!fxEQ`78p|jr zd=1~gw{V=a^#qN7(f{}G1JP4eqbr7+r8#eRe&k5Z&q$eE+NBc6t*8$OXP0QA)zG<}9%Kp0?*tphQ$ zH};)42nS;p#B4?QIaHpb*ZG*U_jFS3A@GQt7MU;qFW7`PKJ5~5yI1+MBoik+SFAzD;#a^VcIAp%e1AT zR3tekL~4wOTAPB&_6S+@pp#t8Af$zIjfhia;e=iy=m3SU#l@`dwzYEq%HW*1wp5Fg z!HZ+%RI+Mu9VR)#FEb>%G*wh)>F}Gh`ew3+s`ge#d-73T zkcNFM#YPfZSy<0sp?G^2F8x)y#AQ9OCK#~fbY9kFDw29P&oNBk{2ds?L_glGRiTtwku3^`?Baz=msx=_!P*cp>d*HgYpwBnkjri^Z^s zD)xEPO3U*z^D_;hUra0O@e<-hNZ=@N%Q7~LykV!+gFN4(?#Olq&(aibc%DBh?Mp>!ch*Da^c7@Gz9R9wG<^4Yx7P6?5Q|7ZGe>Ko9@9GZt(xo=0u2$Go~ zK0jY@UL;EDqR!66wGFZEQeuLkn!Wfi!R?;hg?qc}s3XLfxPSP%*&+tJ+1f|(>Rz3x zC-q;QDZ)L^P9zXbUY(kO1~mcFz$j7P>pB>#XUa~!=r1G^3v~hu#*E3$9G~AwvKB7> zH{8D+U*Oez!6AGJU&dEx?p1t^BIN5N!~^s{L%)QaQVHczK@nR?(Mw#_($T2@Z&XZq zA>A$YkasGOWLhP86c0nuQ`e)ZmO3pyd#R2^OU%=jr|3r2pvT?cJV2={8KY7!(adW| zKJy80ZEJ`Mf@ISv(9?Q(6A#tO>TeUU1K+~K!fk$MUBCXG0@%>^S@=$uNPouL5qwXS zIC@QLnDvpgD|Hl%CzX(1(kl57_uqye;m7z1{vAKX&-h|~KCk5$@DQ)#3*I3G9mQk# zIevj(;#c@JeuLlQacbFIK=pGK{+q^kV(6K>JRDCXdon`}?Z3W+;9U9D>hg-@hk^ssLn>4B|F;#YG59~DHsiQr3Q3tdUM zE30_4QE(Xo`T>8`sWXZ)9hKf2=)xZ$=XbcKjMc+6J=5SzblAVQe>3f`hKWK-6r*W~ z{R6r5JNudKm;KBp22pSRqZ2ws)LCFM4cc!|L~VwwVxy>p-$9jDVD&EwG*}s^ONaGg zeMQSiG@61dL#@<8=wf}S;!CFEys_&vMro2FJhf0}r;=2MkQha)Ef(LwPGeLd5)4}F znLW8RRK*6tWT6+{$hAeuFdf$~-g=y1Lva5d*~5kk8>5CuHC6hP#6_l;p@#M2G6{4L zRnFpq)5~=AmKhrdgZVOUrV>jV)!3tciu$GS1-}r!fIKF#FC(f@g-~vyNT^& zyV)b`QT7;nmi;d~%-(1JU|+DW*f;FB$z;kf^*0SRWt)bYhM9(&W}7rqt7)xii|JO= zZquWt$4pO{o-{pWddBpe=>^k^rk73Mn|?Oi%`UUY>^1w%W#&qAjd`Vcjd`PaxA{%; zQS&kL7v?X`Uz@)*e`o$b^S{jBn}0N)ummgvEyb2umPM8ZOPgh#Ws_yAWxHjEWtZi4 z%bk|HEW0iDTOP6Ox4dq7+w!61sO1aGSC((A7OUH;So>Q?S|?hkTWhT6TQ9KISsScN ztxeXLb+z?U>t^e%*6r3E*1N3_S|7E(YJJ^$zE9n(eUdGuv^y&3?Lln0<~x`z!Xh>>t^WNwVaV0+K5AmHJDkO9P}#DND+h zhDyVv;nFB+tW+dTkQ$}sQipVfbc3`@x?Q?cx=Y$E?UC-29*`cA9+vh=k4w)>A4tcf z*m0I)gkz+mz%j}(-7(Lx#L?9lIS5 zJ05lHb3EgC({aS{spBih38%&BcaC(HIV+rVob#Mj&Lz%>GvVxTu5)g2-sIfv-0OV7 z`HJ&{j6g@m~&2&|`Lar6AHrFcGYS$XqR@Z&52V4)i9(FzIdc}3f z^@;1BuK&7zcB9+mwz&Jchq!aydG367p?kc0qWf(36nBaHTz8GT+1=ufxtF^W?oRhc z_f_ue-8Z^#b3fpI!u_QCDfct(m)r;4Z@WKs|KR?~qj=8r8qal}n?1LA?(^*PeC_#OM%gb9k@Mw3d9*x69w(2NC(31VxjbDySDqy|%1OCX z-XLEiKPx{kzaa0IUy@&uUy~2W2jxTZVfh{TTd(Bxc@=LTZ$EFLcae9c_ge3B-lN{n zy9li~|&AzR^UB3H$5Bm1{9`Wt-J?{I9@2|e2zMuSl zf2KdzKi*&FU*M1WFY^D%f3bhPe}jLc{~G^R|9$?w{tx^g`9Jpm-Tzs@6YvInfj~eF zObL_(rUuFa<$>ve<$**X8CVf$3tSZVbKvg4?!cbFeSv*}{ef2lZv{RK{5$ZI;!*}E znaW@#TN$bpC=-o0FO=(oZO0&|U#FXVqLP;qrm3E~=S*NU5HYi(^Ta~{m zPb<$V&nqt|FDfr9uPU!A2b6=#A?2|0j&ekKU-?ius>-TQ4XCQxSM9H!t`1N$)xm1E zI#eB|4p(#4JT+e}R7b00)hX&ywMkv3M%1Xao%xIQYA zdbxU~dX;*$dab%ey+QpSb*p-dx=rm;?^5qp?@=FCA5r(I&!`8~x74HR@jjkDXBhPg PW9k1*#((#3pMn1m^I)7n literal 0 HcmV?d00001 diff --git a/Carthage/Checkouts/Instantiate/Instantiate.playground/Resources/PlaygroundView.xib b/Carthage/Checkouts/Instantiate/Instantiate.playground/Resources/PlaygroundView.xib new file mode 100644 index 0000000..f316c75 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.playground/Resources/PlaygroundView.xib @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Instantiate.playground/Sources/PlaygroundView.swift b/Carthage/Checkouts/Instantiate/Instantiate.playground/Sources/PlaygroundView.swift new file mode 100644 index 0000000..cac0f9c --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.playground/Sources/PlaygroundView.swift @@ -0,0 +1,6 @@ +import AppKit + +public class PlaygroundView: NSView { + @IBOutlet public weak var titleLabel: NSTextField! + @IBOutlet public weak var textView: NSTextView! +} diff --git a/Carthage/Checkouts/Instantiate/Instantiate.playground/contents.xcplayground b/Carthage/Checkouts/Instantiate/Instantiate.playground/contents.xcplayground new file mode 100644 index 0000000..2e1031d --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.playground/contents.xcplayground @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Carthage/Checkouts/Instantiate/Instantiate.playground/timeline.xctimeline b/Carthage/Checkouts/Instantiate/Instantiate.playground/timeline.xctimeline new file mode 100644 index 0000000..bf468af --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.playground/timeline.xctimeline @@ -0,0 +1,6 @@ + + + + + diff --git a/Carthage/Checkouts/Instantiate/Instantiate.podspec b/Carthage/Checkouts/Instantiate/Instantiate.podspec new file mode 100644 index 0000000..5af108d --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.podspec @@ -0,0 +1,19 @@ +Pod::Spec.new do |s| + s.name = 'Instantiate' + s.version = '3.0.1' + s.summary = 'Type-safe InterfaceBuilder protocols.' + s.description = <<-DESC +Storyboard and Nib is not type safe, if you use `UIStoryboard` or `UINib`, your code would be get some gloom. +Instantiate take type-safe protocols for Storyboard and Nib. Lets' improve our code with type-safe protocols! + DESC + s.homepage = 'https://github.com/tarunon/Instantiate' + s.license = { :type => 'MIT', :file => 'LICENSE' } + s.author = { 'tarunon' => 'croissant9603@gmail.com' } + s.source = { :git => 'https://github.com/tarunon/Instantiate.git', :tag => s.version.to_s } + + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.tvos.deployment_target = '9.0' + + s.source_files = 'Sources/Instantiate/**/*' +end diff --git a/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateStandard_Info.plist b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateStandard_Info.plist new file mode 100644 index 0000000..9358c42 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateStandard_Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 3.0.0 + CFBundleSignature + ???? + CFBundleVersion + 3.0.0 + NSPrincipalClass + + + diff --git a/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateTestsResource_Info.plist b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateTestsResource_Info.plist new file mode 100644 index 0000000..ffddcb2 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateTestsResource_Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 2.0.0 + CFBundleSignature + ???? + CFBundleVersion + 2.0.0.1 + NSPrincipalClass + + + diff --git a/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateTestsResource_iOS_Info.plist b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateTestsResource_iOS_Info.plist new file mode 100644 index 0000000..57ada9f --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateTestsResource_iOS_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateTestsResource_macOS_Info.plist b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateTestsResource_macOS_Info.plist new file mode 100644 index 0000000..57ada9f --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateTestsResource_macOS_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateTests_Info.plist b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateTests_Info.plist new file mode 100644 index 0000000..7c23420 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/InstantiateTests_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/Instantiate_Info.plist b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/Instantiate_Info.plist new file mode 100644 index 0000000..9358c42 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/Instantiate_Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 3.0.0 + CFBundleSignature + ???? + CFBundleVersion + 3.0.0 + NSPrincipalClass + + + diff --git a/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/iOSTestsResource_Info.plist b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/iOSTestsResource_Info.plist new file mode 100644 index 0000000..57ada9f --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/iOSTestsResource_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/iOSTests_Info.plist b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/iOSTests_Info.plist new file mode 100644 index 0000000..7c23420 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/iOSTests_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/macOSTestsResource_Info.plist b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/macOSTestsResource_Info.plist new file mode 100644 index 0000000..57ada9f --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/macOSTestsResource_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/macOSTests_Info.plist b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/macOSTests_Info.plist new file mode 100644 index 0000000..7c23420 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/macOSTests_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/project.pbxproj b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/project.pbxproj new file mode 100644 index 0000000..4288517 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/project.pbxproj @@ -0,0 +1,765 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + D2E737561F0F59190023941F /* Nib+UIViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2E737551F0F59190023941F /* Nib+UIViewController.swift */; }; + D2E737591F0F5B380023941F /* ViewLoadBeforeInject.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2E737581F0F5B380023941F /* ViewLoadBeforeInject.swift */; }; + D2E7375B1F0F5C5C0023941F /* Nib+NSViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2E7375A1F0F5C5C0023941F /* Nib+NSViewController.swift */; }; + EB2DCE5B1EF2623B00211317 /* Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB2DCE581EF2622500211317 /* Deprecated.swift */; }; + EB5AE7981EF10F19003CC16D /* Resoources-tvOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB5AE7971EF10F19003CC16D /* Resoources-tvOS.swift */; }; + EB5B49C51EF262E80059DCF3 /* Identifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB5B49C41EF262E80059DCF3 /* Identifier.swift */; }; + OBJ_43 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_9 /* Extensions.swift */; }; + OBJ_45 /* Instantiate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = OBJ_36 /* Instantiate.framework */; }; + OBJ_52 /* Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_11 /* Deprecated.swift */; }; + OBJ_53 /* Injectable.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_12 /* Injectable.swift */; }; + OBJ_54 /* Instantiatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_13 /* Instantiatable.swift */; }; + OBJ_55 /* Nib.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_14 /* Nib.swift */; }; + OBJ_56 /* Reusable.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_15 /* Reusable.swift */; }; + OBJ_57 /* Storyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_16 /* Storyboard.swift */; }; + OBJ_58 /* Nib+UIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_18 /* Nib+UIView.swift */; }; + OBJ_59 /* Reusable+UICollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_19 /* Reusable+UICollectionView.swift */; }; + OBJ_60 /* Reusable+UITableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_20 /* Reusable+UITableView.swift */; }; + OBJ_61 /* Storyboard+UIViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_21 /* Storyboard+UIViewController.swift */; }; + OBJ_62 /* Nib+NSView.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_23 /* Nib+NSView.swift */; }; + OBJ_63 /* Reusable+NSCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_24 /* Reusable+NSCollectionView.swift */; }; + OBJ_64 /* Reusable+NSTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_25 /* Reusable+NSTableView.swift */; }; + OBJ_65 /* Storyboard+NSViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_26 /* Storyboard+NSViewController.swift */; }; + OBJ_72 /* InstantiateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_29 /* InstantiateTests.swift */; }; + OBJ_73 /* Resources-iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_31 /* Resources-iOS.swift */; }; + OBJ_74 /* Resources-macOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_33 /* Resources-macOS.swift */; }; + OBJ_76 /* Instantiate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = OBJ_36 /* Instantiate.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + EB5AE76E1EF0F090003CC16D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = OBJ_1 /* Project object */; + proxyType = 1; + remoteGlobalIDString = OBJ_47; + remoteInfo = Instantiate; + }; + EB5AE76F1EF0F090003CC16D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = OBJ_1 /* Project object */; + proxyType = 1; + remoteGlobalIDString = OBJ_47; + remoteInfo = Instantiate; + }; + EB5AE7701EF0F0A9003CC16D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = OBJ_1 /* Project object */; + proxyType = 1; + remoteGlobalIDString = OBJ_38; + remoteInfo = InstantiateStandard; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + D21BE8BA1EF2D85B00A58C8C /* Readme.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = Readme.md; sourceTree = ""; }; + D21BE8BB1EF2DD4500A58C8C /* Instantiate.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = Instantiate.podspec; sourceTree = ""; }; + D21BE8BC1EF2DE6900A58C8C /* InstantiateStandard.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = InstantiateStandard.podspec; sourceTree = ""; }; + D276FC671EF1845A00270D6E /* Instantiate.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = Instantiate.playground; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; + D2E737551F0F59190023941F /* Nib+UIViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Nib+UIViewController.swift"; sourceTree = ""; }; + D2E737571F0F59F70023941F /* NibViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NibViewController.xib; sourceTree = ""; }; + D2E737581F0F5B380023941F /* ViewLoadBeforeInject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewLoadBeforeInject.swift; sourceTree = ""; }; + D2E7375A1F0F5C5C0023941F /* Nib+NSViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Nib+NSViewController.swift"; sourceTree = ""; }; + D2E7375D1F0F5D5B0023941F /* NibViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NibViewController.xib; sourceTree = ""; }; + D2E737601F0F5E720023941F /* NibViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NibViewController.xib; sourceTree = ""; }; + EB2DCE581EF2622500211317 /* Deprecated.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Deprecated.swift; sourceTree = ""; }; + EB5AE7741EF0F5D3003CC16D /* CopyBundleResources.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = CopyBundleResources.sh; sourceTree = ""; }; + EB5AE7751EF0F98C003CC16D /* CollectionReusableView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CollectionReusableView.xib; sourceTree = ""; }; + EB5AE7761EF0F98C003CC16D /* CollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CollectionViewCell.xib; sourceTree = ""; }; + EB5AE7771EF0F98C003CC16D /* SubclassView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SubclassView.xib; sourceTree = ""; }; + EB5AE7781EF0F98C003CC16D /* TableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TableViewCell.xib; sourceTree = ""; }; + EB5AE7791EF0F98C003CC16D /* View.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = View.xib; sourceTree = ""; }; + EB5AE77A1EF0F98C003CC16D /* ViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = ViewController.storyboard; sourceTree = ""; }; + EB5AE77B1EF0F994003CC16D /* CollectionReusableView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CollectionReusableView.xib; sourceTree = ""; }; + EB5AE77C1EF0F994003CC16D /* CollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CollectionViewCell.xib; sourceTree = ""; }; + EB5AE77D1EF0F994003CC16D /* SubclassView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SubclassView.xib; sourceTree = ""; }; + EB5AE77E1EF0F994003CC16D /* TableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TableViewCell.xib; sourceTree = ""; }; + EB5AE77F1EF0F994003CC16D /* TableViewHeader.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TableViewHeader.xib; sourceTree = ""; }; + EB5AE7801EF0F994003CC16D /* View.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = View.xib; sourceTree = ""; }; + EB5AE7811EF0F994003CC16D /* ViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = ViewController.storyboard; sourceTree = ""; }; + EB5AE7971EF10F19003CC16D /* Resoources-tvOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Resoources-tvOS.swift"; sourceTree = ""; }; + EB5AE7991EF10F5A003CC16D /* CollectionReusableView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CollectionReusableView.xib; sourceTree = ""; }; + EB5AE79A1EF10F92003CC16D /* CollectionViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CollectionViewCell.xib; sourceTree = ""; }; + EB5AE79B1EF10FBC003CC16D /* SubclassView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SubclassView.xib; sourceTree = ""; }; + EB5AE79C1EF10FD8003CC16D /* TableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TableViewCell.xib; sourceTree = ""; }; + EB5AE79D1EF11016003CC16D /* TableViewHeader.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TableViewHeader.xib; sourceTree = ""; }; + EB5AE79E1EF11064003CC16D /* View.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = View.xib; sourceTree = ""; }; + EB5AE79F1EF11085003CC16D /* ViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = ViewController.storyboard; sourceTree = ""; }; + EB5B49C41EF262E80059DCF3 /* Identifier.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Identifier.swift; sourceTree = ""; }; + OBJ_11 /* Deprecated.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Deprecated.swift; sourceTree = ""; }; + OBJ_12 /* Injectable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Injectable.swift; sourceTree = ""; }; + OBJ_13 /* Instantiatable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Instantiatable.swift; sourceTree = ""; }; + OBJ_14 /* Nib.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Nib.swift; sourceTree = ""; }; + OBJ_15 /* Reusable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Reusable.swift; sourceTree = ""; }; + OBJ_16 /* Storyboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Storyboard.swift; sourceTree = ""; }; + OBJ_18 /* Nib+UIView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Nib+UIView.swift"; sourceTree = ""; }; + OBJ_19 /* Reusable+UICollectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Reusable+UICollectionView.swift"; sourceTree = ""; }; + OBJ_20 /* Reusable+UITableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Reusable+UITableView.swift"; sourceTree = ""; }; + OBJ_21 /* Storyboard+UIViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Storyboard+UIViewController.swift"; sourceTree = ""; }; + OBJ_23 /* Nib+NSView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Nib+NSView.swift"; sourceTree = ""; }; + OBJ_24 /* Reusable+NSCollectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Reusable+NSCollectionView.swift"; sourceTree = ""; }; + OBJ_25 /* Reusable+NSTableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Reusable+NSTableView.swift"; sourceTree = ""; }; + OBJ_26 /* Storyboard+NSViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Storyboard+NSViewController.swift"; sourceTree = ""; }; + OBJ_29 /* InstantiateTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstantiateTests.swift; sourceTree = ""; }; + OBJ_31 /* Resources-iOS.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Resources-iOS.swift"; sourceTree = ""; }; + OBJ_33 /* Resources-macOS.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Resources-macOS.swift"; sourceTree = ""; }; + OBJ_35 /* InstantiateStandard.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = InstantiateStandard.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + OBJ_36 /* Instantiate.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Instantiate.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + OBJ_37 /* InstantiateTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; path = InstantiateTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; + OBJ_9 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + OBJ_44 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 0; + files = ( + OBJ_45 /* Instantiate.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + OBJ_66 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + OBJ_75 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 0; + files = ( + OBJ_76 /* Instantiate.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + EB5AE7961EF10EDC003CC16D /* tvOS */ = { + isa = PBXGroup; + children = ( + EB5AE7971EF10F19003CC16D /* Resoources-tvOS.swift */, + EB5AE7991EF10F5A003CC16D /* CollectionReusableView.xib */, + EB5AE79A1EF10F92003CC16D /* CollectionViewCell.xib */, + EB5AE79B1EF10FBC003CC16D /* SubclassView.xib */, + EB5AE79C1EF10FD8003CC16D /* TableViewCell.xib */, + EB5AE79D1EF11016003CC16D /* TableViewHeader.xib */, + EB5AE79E1EF11064003CC16D /* View.xib */, + EB5AE79F1EF11085003CC16D /* ViewController.storyboard */, + D2E737601F0F5E720023941F /* NibViewController.xib */, + ); + path = tvOS; + sourceTree = ""; + }; + OBJ_10 /* Instantiate */ = { + isa = PBXGroup; + children = ( + OBJ_11 /* Deprecated.swift */, + EB5B49C41EF262E80059DCF3 /* Identifier.swift */, + OBJ_12 /* Injectable.swift */, + OBJ_13 /* Instantiatable.swift */, + OBJ_14 /* Nib.swift */, + OBJ_15 /* Reusable.swift */, + OBJ_16 /* Storyboard.swift */, + D2E737581F0F5B380023941F /* ViewLoadBeforeInject.swift */, + OBJ_17 /* iOS */, + OBJ_22 /* macOS */, + ); + name = Instantiate; + path = Sources/Instantiate; + sourceTree = SOURCE_ROOT; + }; + OBJ_17 /* iOS */ = { + isa = PBXGroup; + children = ( + OBJ_18 /* Nib+UIView.swift */, + D2E737551F0F59190023941F /* Nib+UIViewController.swift */, + OBJ_19 /* Reusable+UICollectionView.swift */, + OBJ_20 /* Reusable+UITableView.swift */, + OBJ_21 /* Storyboard+UIViewController.swift */, + ); + path = iOS; + sourceTree = ""; + }; + OBJ_22 /* macOS */ = { + isa = PBXGroup; + children = ( + OBJ_23 /* Nib+NSView.swift */, + D2E7375A1F0F5C5C0023941F /* Nib+NSViewController.swift */, + OBJ_24 /* Reusable+NSCollectionView.swift */, + OBJ_25 /* Reusable+NSTableView.swift */, + OBJ_26 /* Storyboard+NSViewController.swift */, + ); + path = macOS; + sourceTree = ""; + }; + OBJ_27 /* Tests */ = { + isa = PBXGroup; + children = ( + OBJ_28 /* InstantiateTests */, + ); + name = Tests; + sourceTree = SOURCE_ROOT; + }; + OBJ_28 /* InstantiateTests */ = { + isa = PBXGroup; + children = ( + OBJ_29 /* InstantiateTests.swift */, + EB5AE7741EF0F5D3003CC16D /* CopyBundleResources.sh */, + OBJ_30 /* iOS */, + OBJ_32 /* macOS */, + EB5AE7961EF10EDC003CC16D /* tvOS */, + ); + name = InstantiateTests; + path = Tests/InstantiateTests; + sourceTree = SOURCE_ROOT; + }; + OBJ_30 /* iOS */ = { + isa = PBXGroup; + children = ( + OBJ_31 /* Resources-iOS.swift */, + EB5AE77B1EF0F994003CC16D /* CollectionReusableView.xib */, + EB5AE77C1EF0F994003CC16D /* CollectionViewCell.xib */, + EB5AE77D1EF0F994003CC16D /* SubclassView.xib */, + EB5AE77E1EF0F994003CC16D /* TableViewCell.xib */, + EB5AE77F1EF0F994003CC16D /* TableViewHeader.xib */, + EB5AE7801EF0F994003CC16D /* View.xib */, + EB5AE7811EF0F994003CC16D /* ViewController.storyboard */, + D2E737571F0F59F70023941F /* NibViewController.xib */, + ); + path = iOS; + sourceTree = ""; + }; + OBJ_32 /* macOS */ = { + isa = PBXGroup; + children = ( + OBJ_33 /* Resources-macOS.swift */, + EB5AE7751EF0F98C003CC16D /* CollectionReusableView.xib */, + EB5AE7761EF0F98C003CC16D /* CollectionViewCell.xib */, + EB5AE7771EF0F98C003CC16D /* SubclassView.xib */, + EB5AE7781EF0F98C003CC16D /* TableViewCell.xib */, + EB5AE7791EF0F98C003CC16D /* View.xib */, + EB5AE77A1EF0F98C003CC16D /* ViewController.storyboard */, + D2E7375D1F0F5D5B0023941F /* NibViewController.xib */, + ); + path = macOS; + sourceTree = ""; + }; + OBJ_34 /* Products */ = { + isa = PBXGroup; + children = ( + OBJ_35 /* InstantiateStandard.framework */, + OBJ_36 /* Instantiate.framework */, + OBJ_37 /* InstantiateTests.xctest */, + ); + name = Products; + sourceTree = BUILT_PRODUCTS_DIR; + }; + OBJ_5 = { + isa = PBXGroup; + children = ( + OBJ_6 /* Package.swift */, + D21BE8BA1EF2D85B00A58C8C /* Readme.md */, + D276FC671EF1845A00270D6E /* Instantiate.playground */, + OBJ_7 /* Sources */, + OBJ_27 /* Tests */, + D21BE8BB1EF2DD4500A58C8C /* Instantiate.podspec */, + D21BE8BC1EF2DE6900A58C8C /* InstantiateStandard.podspec */, + OBJ_34 /* Products */, + ); + sourceTree = ""; + }; + OBJ_7 /* Sources */ = { + isa = PBXGroup; + children = ( + OBJ_10 /* Instantiate */, + OBJ_8 /* InstantiateStandard */, + ); + name = Sources; + sourceTree = SOURCE_ROOT; + }; + OBJ_8 /* InstantiateStandard */ = { + isa = PBXGroup; + children = ( + EB2DCE581EF2622500211317 /* Deprecated.swift */, + OBJ_9 /* Extensions.swift */, + ); + name = InstantiateStandard; + path = Sources/InstantiateStandard; + sourceTree = SOURCE_ROOT; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + OBJ_38 /* InstantiateStandard */ = { + isa = PBXNativeTarget; + buildConfigurationList = OBJ_39 /* Build configuration list for PBXNativeTarget "InstantiateStandard" */; + buildPhases = ( + OBJ_42 /* Sources */, + OBJ_44 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + OBJ_46 /* PBXTargetDependency */, + ); + name = InstantiateStandard; + productName = InstantiateStandard; + productReference = OBJ_35 /* InstantiateStandard.framework */; + productType = "com.apple.product-type.framework"; + }; + OBJ_47 /* Instantiate */ = { + isa = PBXNativeTarget; + buildConfigurationList = OBJ_48 /* Build configuration list for PBXNativeTarget "Instantiate" */; + buildPhases = ( + OBJ_51 /* Sources */, + OBJ_66 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Instantiate; + productName = Instantiate; + productReference = OBJ_36 /* Instantiate.framework */; + productType = "com.apple.product-type.framework"; + }; + OBJ_67 /* InstantiateTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = OBJ_68 /* Build configuration list for PBXNativeTarget "InstantiateTests" */; + buildPhases = ( + OBJ_71 /* Sources */, + OBJ_75 /* Frameworks */, + EB5AE7731EF0F0FE003CC16D /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + EB5AE7711EF0F0A9003CC16D /* PBXTargetDependency */, + OBJ_77 /* PBXTargetDependency */, + ); + name = InstantiateTests; + productName = InstantiateTests; + productReference = OBJ_37 /* InstantiateTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + OBJ_1 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + TargetAttributes = { + OBJ_38 = { + LastSwiftMigration = 1020; + }; + OBJ_47 = { + LastSwiftMigration = 1020; + }; + OBJ_67 = { + LastSwiftMigration = 1020; + }; + }; + }; + buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "Instantiate" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = OBJ_5; + productRefGroup = OBJ_34 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + OBJ_47 /* Instantiate */, + OBJ_38 /* InstantiateStandard */, + OBJ_67 /* InstantiateTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXShellScriptBuildPhase section */ + EB5AE7731EF0F0FE003CC16D /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = $PROJECT_DIR/Tests/$PRODUCT_MODULE_NAME/CopyBundleResources.sh; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + OBJ_42 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 0; + files = ( + EB2DCE5B1EF2623B00211317 /* Deprecated.swift in Sources */, + OBJ_43 /* Extensions.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + OBJ_51 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 0; + files = ( + OBJ_52 /* Deprecated.swift in Sources */, + EB5B49C51EF262E80059DCF3 /* Identifier.swift in Sources */, + OBJ_53 /* Injectable.swift in Sources */, + OBJ_54 /* Instantiatable.swift in Sources */, + OBJ_55 /* Nib.swift in Sources */, + OBJ_56 /* Reusable.swift in Sources */, + D2E737561F0F59190023941F /* Nib+UIViewController.swift in Sources */, + OBJ_57 /* Storyboard.swift in Sources */, + D2E737591F0F5B380023941F /* ViewLoadBeforeInject.swift in Sources */, + D2E7375B1F0F5C5C0023941F /* Nib+NSViewController.swift in Sources */, + OBJ_58 /* Nib+UIView.swift in Sources */, + OBJ_59 /* Reusable+UICollectionView.swift in Sources */, + OBJ_60 /* Reusable+UITableView.swift in Sources */, + OBJ_61 /* Storyboard+UIViewController.swift in Sources */, + OBJ_62 /* Nib+NSView.swift in Sources */, + OBJ_63 /* Reusable+NSCollectionView.swift in Sources */, + OBJ_64 /* Reusable+NSTableView.swift in Sources */, + OBJ_65 /* Storyboard+NSViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + OBJ_71 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 0; + files = ( + OBJ_72 /* InstantiateTests.swift in Sources */, + OBJ_73 /* Resources-iOS.swift in Sources */, + OBJ_74 /* Resources-macOS.swift in Sources */, + EB5AE7981EF10F19003CC16D /* Resoources-tvOS.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + EB5AE7711EF0F0A9003CC16D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = OBJ_38 /* InstantiateStandard */; + targetProxy = EB5AE7701EF0F0A9003CC16D /* PBXContainerItemProxy */; + }; + OBJ_46 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = OBJ_47 /* Instantiate */; + targetProxy = EB5AE76E1EF0F090003CC16D /* PBXContainerItemProxy */; + }; + OBJ_77 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = OBJ_47 /* Instantiate */; + targetProxy = EB5AE76F1EF0F090003CC16D /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + OBJ_3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_NS_ASSERTIONS = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.10; + ONLY_ACTIVE_ARCH = YES; + OTHER_SWIFT_FLAGS = "-DXcode"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + USE_HEADERMAP = NO; + }; + name = Debug; + }; + OBJ_4 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = s; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.10; + OTHER_SWIFT_FLAGS = "-DXcode"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; + USE_HEADERMAP = NO; + }; + name = Release; + }; + OBJ_40 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = Instantiate.xcodeproj/InstantiateStandard_Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = InstantiateStandard; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator"; + SWIFT_VERSION = 5.0; + TARGET_NAME = InstantiateStandard; + TVOS_DEPLOYMENT_TARGET = 9.0; + }; + name = Debug; + }; + OBJ_41 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = Instantiate.xcodeproj/InstantiateStandard_Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = InstantiateStandard; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator"; + SWIFT_VERSION = 5.0; + TARGET_NAME = InstantiateStandard; + TVOS_DEPLOYMENT_TARGET = 9.0; + }; + name = Release; + }; + OBJ_49 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = Instantiate.xcodeproj/Instantiate_Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = Instantiate; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator"; + SWIFT_VERSION = 5.0; + TARGET_NAME = Instantiate; + TVOS_DEPLOYMENT_TARGET = 9.0; + }; + name = Debug; + }; + OBJ_50 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = Instantiate.xcodeproj/Instantiate_Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = Instantiate; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator"; + SWIFT_VERSION = 5.0; + TARGET_NAME = Instantiate; + TVOS_DEPLOYMENT_TARGET = 9.0; + }; + name = Release; + }; + OBJ_69 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = Instantiate.xcodeproj/InstantiateTests_Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator"; + SWIFT_VERSION = 5.0; + TARGET_NAME = InstantiateTests; + TVOS_DEPLOYMENT_TARGET = 9.0; + }; + name = Debug; + }; + OBJ_70 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = Instantiate.xcodeproj/InstantiateTests_Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator"; + SWIFT_VERSION = 5.0; + TARGET_NAME = InstantiateTests; + TVOS_DEPLOYMENT_TARGET = 9.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + OBJ_2 /* Build configuration list for PBXProject "Instantiate" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_3 /* Debug */, + OBJ_4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + OBJ_39 /* Build configuration list for PBXNativeTarget "InstantiateStandard" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_40 /* Debug */, + OBJ_41 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + OBJ_48 /* Build configuration list for PBXNativeTarget "Instantiate" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_49 /* Debug */, + OBJ_50 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + OBJ_68 /* Build configuration list for PBXNativeTarget "InstantiateTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_69 /* Debug */, + OBJ_70 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = OBJ_1 /* Project object */; +} diff --git a/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/xcshareddata/xcschemes/Instantiate.xcscheme b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/xcshareddata/xcschemes/Instantiate.xcscheme new file mode 100644 index 0000000..2f21d6d --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/xcshareddata/xcschemes/Instantiate.xcscheme @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/xcshareddata/xcschemes/InstantiateStandard.xcscheme b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/xcshareddata/xcschemes/InstantiateStandard.xcscheme new file mode 100644 index 0000000..d688479 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/xcshareddata/xcschemes/InstantiateStandard.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..1191838 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Instantiate.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist @@ -0,0 +1,12 @@ + + + + SchemeUserState + + Instantiate.xcscheme + + + SuppressBuildableAutocreation + + + diff --git a/Carthage/Checkouts/Instantiate/InstantiateStandard.podspec b/Carthage/Checkouts/Instantiate/InstantiateStandard.podspec new file mode 100644 index 0000000..dfd7dfe --- /dev/null +++ b/Carthage/Checkouts/Instantiate/InstantiateStandard.podspec @@ -0,0 +1,20 @@ +Pod::Spec.new do |s| + s.name = 'InstantiateStandard' + s.version = '3.0.1' + s.summary = 'Type-safe InterfaceBuilder protocols.' + s.description = <<-DESC +Storyboard and Nib is not type safe, if you use `UIStoryboard` or `UINib`, your code would be get some gloom. +Instantiate take type-safe protocols for Storyboard and Nib. Lets' improve our code with type-safe protocols! + DESC + s.homepage = 'https://github.com/tarunon/Instantiate' + s.license = { :type => 'MIT', :file => 'LICENSE' } + s.author = { 'tarunon' => 'croissant9603@gmail.com' } + s.source = { :git => 'https://github.com/tarunon/Instantiate.git', :tag => s.version.to_s } + + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.tvos.deployment_target = '9.0' + + s.source_files = 'Sources/InstantiateStandard/**/*' + s.dependency 'Instantiate', '~>3.0' +end diff --git a/Carthage/Checkouts/Instantiate/LICENSE b/Carthage/Checkouts/Instantiate/LICENSE new file mode 100644 index 0000000..b4a5be2 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Nobuo Saito + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/Carthage/Checkouts/Instantiate/Package.swift b/Carthage/Checkouts/Instantiate/Package.swift new file mode 100644 index 0000000..9a00510 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Package.swift @@ -0,0 +1,22 @@ +// swift-tools-version:3.1 + +import PackageDescription +import Foundation + +let libralies = [ + Target( + name: "Instantiate" + ), + Target( + name: "InstantiateStandard", + dependencies: [ + .Target(name: "Instantiate") + ] + ) +] + +let package = Package( + name: "Instantiate", + targets: libralies, + swiftLanguageVersions: [3, 4] +) diff --git a/Carthage/Checkouts/Instantiate/Readme.md b/Carthage/Checkouts/Instantiate/Readme.md new file mode 100644 index 0000000..83cfc35 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Readme.md @@ -0,0 +1,65 @@ +# Instantiate +[![Build Status](https://travis-ci.org/tarunon/Instantiate.svg?branch=master)](https://travis-ci.org/tarunon/Instantiate) +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) + +Type-safe and constructor injectable InterfaceBuilder protocols. + +## Summary + +Storyboard and Nib is not type safe, if you use `UIStoryboard` or `UINib`, your code would be get some gloom. +Instantiate take type-safe protocols for Storyboard and Nib. Lets' improve our code with type-safe protocols! + +### as is +```swift +let storyboard = UIStoryboard(name: "ViewController", bundle: Bundle.main) +let vc = storyboard.instantiateInitialViewController() as! ViewController +vc.inject([1, 2, 3]) +``` + +### to be +```swift +import Instantiate +import InstantiateStandard +extension ViewController: StoryboardInstantiatable {} +let vc = ViewController(with: [1, 2, 3]) +``` + + +## Protocols +### StoryboardInstantiatable +Supports using viewController with Storyboard. Implement `StoryboardInstantiatable` at your viewController class, then you can use `ViewController(with: Dependency)`. +### NibInstantiatable +Supports using view with Nib. Implement `NibInstantiatable` at your view class, then you can use `View(with: Dependency)`. +#### NibInstantiatableWrapper +Supports using view implements NibInstantiatable in other InterfaceBuilder. NibInstantiatableWrapper supports workaround. Make new `UIView` subclass, and implement `NibInstantiatableWrapper`, call `loadView` on `init(coder:)` and `prepareForInterfaceBuilder`. +http://stackoverflow.com/questions/27807951/how-to-embed-a-custom-view-xib-in-a-storyboard-scene +### Reusable +Supports `UITableViewCell` / `UICollectionViewCell` reuse features. +Implement `Reusable`, then you can dequeue cell using `Cell.dequeue(from: Parent, for: IndexPath, with: Dependency)`. + +## InstantiateStandard +`StoryboardType` and `NibType` required `static var storyboard` or `static var nib`. You need to write these values on own class, it is troublesome... +Many developer define StoryboardName is same of ClassName, and if you are also, you can use `InstantiateStandard`. +This libraly add default implementation of `StoryboardType`, `NibType`, and `Reusable`. + +## Instalation +### Carthage +```ruby +github "tarunon/Instantiate" +``` + +### Pods +```ruby +pod 'Instantiate' +``` + +## Requirement +Platform | Version +--- | --- +iOS | 9.0+ +macOS | 10.11+ +tvOS | 9.0+ +Swift | 4.0+ + +## for Swift3.x +[Version 2](https://github.com/tarunon/Instantiate/releases/tag/2.2.0) support swift3. diff --git a/Carthage/Checkouts/Instantiate/Sources/Instantiate/Deprecated.swift b/Carthage/Checkouts/Instantiate/Sources/Instantiate/Deprecated.swift new file mode 100644 index 0000000..a98d38f --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/Instantiate/Deprecated.swift @@ -0,0 +1,115 @@ +// +// Deprecated.swift +// Instantiate +// +// Created by tarunon on 2017/04/01. +// Copyright © 2017年 tarunon. All rights reserved. +// + +import Foundation + +@available(*, unavailable, renamed: "Injectable", message: "'Bindable' is now unavailable, please check 'Injectable'") +public protocol Bindable: Injectable { + associatedtype Parameter = Dependency +} + +public extension Injectable { + @available(*, unavailable, renamed: "inject") + func bind(_ parameter: Dependency) { + inject(parameter) + } +} + +#if os(iOS) + +import UIKit + +public extension UITableView { + @available(*, deprecated, message: "use 'C.dequeue(from:for:)' instead") + public func dequeueReusableCell(type: C.Type = C.self, for indexPath: IndexPath) -> C where C: Reusable, C.Dependency == Void { + return C.dequeue(from: self, for: indexPath) + } + + @available(*, deprecated, message: "use 'C.dequeue(from:for:with:)' instead") + public func dequeueReusableCell(type: C.Type = C.self, for indexPath: IndexPath, with dependency:C.Dependency) -> C where C: Reusable { + return C.dequeue(from: self, for: indexPath, with: dependency) + } + + @available(*, deprecated, message: "use 'C.dequeue(from:)' instead") + public func dequeueReusableHeaderFooter(type: C.Type = C.self) -> C where C: Reusable, C.Dependency == Void { + return C.dequeue(from: self) + } + + @available(*, deprecated, message: "use 'C.dequeue(from:with:)' instead") + public func dequeueReusableHeaderFooter(type: C.Type = C.self, with dependency:C.Dependency) -> C where C: Reusable { + return C.dequeue(from: self, with: dependency) + } +} + +public extension UICollectionView { + @available(*, deprecated, message: "use 'C.dequeue(from:for:)' instead") + public func dequeueReusableCell(type: C.Type = C.self, for indexPath: IndexPath) -> C where C: Reusable, C.Dependency == Void { + return C.dequeue(from: self, for: indexPath) + } + + @available(*, deprecated, message: "use 'C.dequeue(from:for:with:)' instead") + public func dequeueReusableCell(type: C.Type = C.self, for indexPath: IndexPath, with dependency:C.Dependency) -> C where C: Reusable { + return C.dequeue(from: self, for: indexPath, with: dependency) + } + + @available(*, deprecated, message: "use 'C.dequeue(from:of:for:)' instead") + public func dequeueueReusableSupplementaryView(type: C.Type = C.self, of kind: String, for indexPath: IndexPath) -> C where C: Reusable, C.Dependency == Void { + return C.dequeue(from: self, of: kind, for: indexPath) + } + + @available(*, deprecated, message: "use 'C.dequeue(from:of:for:with:)' instead") + public func dequeueueReusableSupplementaryView(type: C.Type = C.self, of kind: String, for indexPath: IndexPath, with dependency:C.Dependency) -> C where C: Reusable { + return C.dequeue(from: self, of: kind, for: indexPath, with: dependency) + } +} + +public extension UITableView { + @available(*, unavailable, message: "use 'C.dequeue(from:for:)' instead") + public func dequeReusableCell(type: C.Type, for indexPath: IndexPath) -> C where C: Reusable, C.Dependency == Void { + fatalError() + } + + @available(*, unavailable, message: "use 'C.dequeue(from:for:with:)' instead") + public func dequeReusableCell(type: C.Type, for indexPath: IndexPath, with dependency:C.Dependency) -> C where C: Reusable { + fatalError() + } + + @available(*, deprecated, message: "use 'C.dequeue(from:)' instead") + public func dequeReusableHeaderFooter(type: C.Type) -> C where C: Reusable, C.Dependency == Void { + fatalError() + } + + @available(*, unavailable, message: "use 'C.dequeue(from:with:)' instead") + public func dequeReusableHeaderFooter(type: C.Type, with dependency:C.Dependency) -> C where C: Reusable { + fatalError() + } +} + +public extension UICollectionView { + @available(*, unavailable, message: "use 'C.dequeue(from:for:)' instead") + public func dequeReusableCell(type: C.Type, for indexPath: IndexPath) -> C where C: Reusable, C.Dependency == Void { + fatalError() + } + + @available(*, unavailable, message: "use 'C.dequeue(from:for:with:)' instead") + public func dequeReusableCell(type: C.Type, for indexPath: IndexPath, with dependency:C.Dependency) -> C where C: Reusable { + fatalError() + } + + @available(*, unavailable, message: "use 'C.dequeue(from:of:for:)' instead") + public func dequeueReusableSupplementaryView(type: C.Type, of kind: String, for indexPath: IndexPath) -> C where C: Reusable, C.Dependency == Void { + fatalError() + } + + @available(*, unavailable, message: "use 'C.dequeue(from:of:for:with:)' instead") + public func dequeueReusableSupplementaryView(type: C.Type, of kind: String, for indexPath: IndexPath, with dependency:C.Dependency) -> C where C: Reusable { + fatalError() + } +} + +#endif diff --git a/Carthage/Checkouts/Instantiate/Sources/Instantiate/Identifier.swift b/Carthage/Checkouts/Instantiate/Sources/Instantiate/Identifier.swift new file mode 100644 index 0000000..7d5add8 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/Instantiate/Identifier.swift @@ -0,0 +1,29 @@ +// +// Identifier.swift +// Instantiate +// +// Created by ST90872 on 2017/06/15. +// + +import Foundation + +public protocol IdentifierType { + static func from(_ source: String) -> Self +} + +extension String: IdentifierType { + public static func from(_ source: String) -> String { + return source + } +} + +extension IdentifierType where Self: RawRepresentable, Self.RawValue == String { + public static func from(_ source: String) -> Self { + return Self.init(rawValue: source)! + } +} + +#if os(macOS) + import AppKit + extension UserInterfaceItemIdentifier: IdentifierType {} +#endif diff --git a/Carthage/Checkouts/Instantiate/Sources/Instantiate/Injectable.swift b/Carthage/Checkouts/Instantiate/Sources/Instantiate/Injectable.swift new file mode 100644 index 0000000..4de70f0 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/Instantiate/Injectable.swift @@ -0,0 +1,20 @@ +// +// Injectable.swift +// Instantiate +// +// Created by tarunon on 2017/01/28. +// Copyright © 2017年 tarunon. All rights reserved. +// + +import Foundation + +public protocol Injectable { + associatedtype Dependency = Void + func inject(_ dependency: Dependency) +} + +public extension Injectable where Dependency == Void { + func inject(_ dependency: Dependency) { + + } +} diff --git a/Carthage/Checkouts/Instantiate/Sources/Instantiate/Instantiatable.swift b/Carthage/Checkouts/Instantiate/Sources/Instantiate/Instantiatable.swift new file mode 100644 index 0000000..cb9a350 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/Instantiate/Instantiatable.swift @@ -0,0 +1,26 @@ +// +// Instantiate.swift +// Instantiate +// +// Created by tarunon on 2016/12/03. +// Copyright © 2016年 tarunon. All rights reserved. +// + +import Foundation + +/// `init(with:)` make user interface object with Nib/Storyboard and some parameter(s) using `Injectable` protocol. +public protocol Instantiatable: Injectable { + init(with dependency:Dependency) +} + +public extension Instantiatable { + static func instantiate(with dependency: Dependency) -> Self { + return Self(with: dependency) + } +} + +public extension Instantiatable where Dependency == Void { + static func instantiate() -> Self { + return Self(with: ()) + } +} diff --git a/Carthage/Checkouts/Instantiate/Sources/Instantiate/Nib.swift b/Carthage/Checkouts/Instantiate/Sources/Instantiate/Nib.swift new file mode 100644 index 0000000..05d502d --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/Instantiate/Nib.swift @@ -0,0 +1,94 @@ +// +// Implements.swift +// Instantiate +// +// Created by tarunon on 2016/12/03. +// Copyright © 2016年 tarunon. All rights reserved. +// + +import Foundation + +#if os(iOS) || os(tvOS) + + import UIKit + public typealias Nib = UINib + public typealias NibName = String + +#endif + +#if os(macOS) + + import AppKit + public typealias Nib = NSNib + public typealias NibName = NSNib.Name + +#endif + +public protocol NibType { + static var nibName: NibName { get } + static var nibBundle: Bundle { get } + static var nib: Nib { get } +} + +public extension NibType where Self: NSObjectProtocol { + static var nibBundle: Bundle { + return Bundle(for: self) + } + + static var nib: Nib { + #if os(iOS) || os(tvOS) + return Nib(nibName: nibName, bundle: nibBundle) + #endif + + #if os(macOS) + return Nib(nibNamed: nibName, bundle: nibBundle)! + #endif + } +} + +/// Supports to associate View class and Nib. +/// Notes: `bind` call after `awakeFromNib`. +public protocol NibInstantiatable: Instantiatable, NibType { + /// Index of `UINib.instantiate(withOwner:options:)`. Default is 0. + static var instantiateIndex: Int { get } +} + +public extension NibInstantiatable where Self: NSObject { + static var instantiateIndex: Int { + return 0 + } +} + +/// Supports to use NibInstantiatable View class in other interface builder.(Nib or Storyboard) +/// Best practice is writing this implementations your NibInstantatable View class +/// ``` +/// #if TARGET_INTERFACE_BUILDER +/// override func prepareForInterfaceBuilder() { +/// super.prepareForInterfaceBuilder() +/// loadView(with: self.dependency) +/// } +/// #else +/// required init?(coder aDecoder: NSCoder) { +/// super.init(coder: aDecoder) +/// loadView(with: self.dependency) // Maybe dependency is a computed property or Void. +/// } +/// #endif +/// ``` +public protocol NibInstantiatableWrapper { + associatedtype Wrapped: NibInstantiatable + + /// Wrapped NibInstantiatable View instance. It's safe after call `loadView`. + var view: Wrapped { get } + /// Wrapped NibInstantiatable View instance. Return nil if before call `loadView`. + var viewIfLoaded: Wrapped? { get } + + /// Call this method on `init(coder:)` and `prepareForInterfaceBuilder` + func loadView(with dependency:Wrapped.Dependency) +} + +public extension NibInstantiatableWrapper where Wrapped.Dependency == Void { + func loadView() { + loadView(with: ()) + } +} + diff --git a/Carthage/Checkouts/Instantiate/Sources/Instantiate/Reusable.swift b/Carthage/Checkouts/Instantiate/Sources/Instantiate/Reusable.swift new file mode 100644 index 0000000..42b55ac --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/Instantiate/Reusable.swift @@ -0,0 +1,22 @@ +// +// Reusable.swift +// Instantiate +// +// Created by tarunon on 2016/12/04. +// Copyright © 2016年 tarunon. All rights reserved. +// + +import Foundation + +/// Supports UITableView/UICollectionView reusable features. +/// Implement your UITableViewCell/UICollectionViewCell subclass. +#if os(macOS) + import AppKit + public typealias UserInterfaceItemIdentifier = NSUserInterfaceItemIdentifier +#else + public typealias UserInterfaceItemIdentifier = String +#endif +public protocol Reusable: Injectable { + static var reusableIdentifier: UserInterfaceItemIdentifier { get } +} + diff --git a/Carthage/Checkouts/Instantiate/Sources/Instantiate/Storyboard.swift b/Carthage/Checkouts/Instantiate/Sources/Instantiate/Storyboard.swift new file mode 100644 index 0000000..f376ee0 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/Instantiate/Storyboard.swift @@ -0,0 +1,61 @@ +// +// Storyboard.swift +// Instantiate +// +// Created by tarunon on 2016/12/04. +// Copyright © 2016年 tarunon. All rights reserved. +// + +import Foundation + +#if os(iOS) || os(tvOS) + + import UIKit + public typealias Storyboard = UIStoryboard + public typealias StoryboardName = String + public typealias StoryboardSceneIdentifier = String +#endif + +#if os(macOS) + + import AppKit + public typealias Storyboard = NSStoryboard + public typealias StoryboardName = NSStoryboard.Name + public typealias StoryboardSceneIdentifier = NSStoryboard.SceneIdentifier +#endif + +public protocol StoryboardType { + static var storyboardName: StoryboardName { get } + static var storyboardBundle: Bundle { get } + static var storyboard: Storyboard { get } +} + +public extension StoryboardType where Self: NSObjectProtocol { + static var storyboardBundle: Bundle { + return Bundle(for: self) + } + + static var storyboard: Storyboard { + return Storyboard(name: storyboardName, bundle: storyboardBundle) + } +} + +public enum InstantiateSource { + case initial + case identifier(StoryboardSceneIdentifier) +} + +/// Supports to associate ViewController class and Storyboard. +/// Notes: If you implement this class, your ViewController class load view in `init(with:)`. +/// Notes: `inject` call after `viewDidLoad`. +public protocol StoryboardInstantiatable: Instantiatable, StoryboardType { + /// Source of Storyboard identifier, or specify initial view controller. Default is .initial + static var instantiateSource: InstantiateSource { get } +} + +public extension StoryboardInstantiatable where Self: NSObject { + static var instantiateSource: InstantiateSource { + return .initial + } +} + diff --git a/Carthage/Checkouts/Instantiate/Sources/Instantiate/ViewLoadBeforeInject.swift b/Carthage/Checkouts/Instantiate/Sources/Instantiate/ViewLoadBeforeInject.swift new file mode 100644 index 0000000..aaed62e --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/Instantiate/ViewLoadBeforeInject.swift @@ -0,0 +1,14 @@ +// +// ViewLoadBeforeInject.swift +// Instantiate +// +// Created by tarunon on 2017/07/07. +// +// + +import Foundation + +/// This protocol allow viewController force load view before call `inject` +public protocol ViewLoadBeforeInject { + +} diff --git a/Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Nib+UIView.swift b/Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Nib+UIView.swift new file mode 100644 index 0000000..c609648 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Nib+UIView.swift @@ -0,0 +1,47 @@ +// +// Nib+UIView.swift +// Instantiate +// +// Created by tarunon on 2017/06/11. +// + +#if os(iOS) || os(tvOS) + + import UIKit + + public extension NibInstantiatable where Self: UIView { + public init(with dependency:Dependency) { + self = Self.nib.instantiate(withOwner: nil, options: nil)[Self.instantiateIndex] as! Self + self.inject(dependency) + } + } + + public extension NibInstantiatableWrapper where Self: UIView, Wrapped: UIView { + var view: Wrapped { + return self.subviews.first as! Wrapped + } + + var viewIfLoaded: Wrapped? { + return self.subviews.first as? Wrapped + } + + func loadView(with dependency:Wrapped.Dependency) { + let view = Wrapped(with: dependency) + if translatesAutoresizingMaskIntoConstraints { + view.translatesAutoresizingMaskIntoConstraints = true + view.autoresizingMask = [.flexibleWidth, .flexibleHeight] + view.frame = self.bounds + self.insertSubview(view, at: 0) + } else { + view.translatesAutoresizingMaskIntoConstraints = false + self.insertSubview(view, at: 0) + view.topAnchor.constraint(equalTo: self.topAnchor).isActive = true + view.bottomAnchor.constraint(equalTo: self.bottomAnchor).isActive = true + view.leftAnchor.constraint(equalTo: self.leftAnchor).isActive = true + view.rightAnchor.constraint(equalTo: self.rightAnchor).isActive = true + } + } + } + +#endif + diff --git a/Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Nib+UIViewController.swift b/Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Nib+UIViewController.swift new file mode 100644 index 0000000..ea18501 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Nib+UIViewController.swift @@ -0,0 +1,26 @@ +// +// Nib+UIViewController.swift +// Instantiate +// +// Created by tarunon on 2017/07/07. +// +// + +#if os(iOS) || os(tvOS) + + import UIKit + + public extension NibInstantiatable where Self: UIViewController { + public init(with dependency:Dependency) { + let nibName = (Self.self as NibType.Type).nibName + let nibBundle = (Self.self as NibType.Type).nibBundle + self = Self(nibName: nibName, bundle: nibBundle) + if self is ViewLoadBeforeInject { + _ = self.view + } + self.inject(dependency) + } + } + +#endif + diff --git a/Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Reusable+UICollectionView.swift b/Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Reusable+UICollectionView.swift new file mode 100644 index 0000000..cf2218b --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Reusable+UICollectionView.swift @@ -0,0 +1,61 @@ +// +// Reusable+UICollectionView.swift +// Instantiate +// +// Created by tarunon on 2017/06/11. +// + +#if os(iOS) || os(tvOS) + + import UIKit + + public extension Reusable where Self: UICollectionViewCell { + public static func dequeue(from collectionView: UICollectionView, for indexPath: IndexPath, with dependency:Dependency) -> Self { + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: Self.reusableIdentifier, for: indexPath) as! Self + cell.inject(dependency) + return cell + } + } + + public extension Reusable where Self: UICollectionViewCell, Self.Dependency == Void { + public static func dequeue(from collectionView: UICollectionView, for indexPath: IndexPath) -> Self { + return dequeue(from: collectionView, for: indexPath, with: ()) + } + } + + public extension Reusable where Self: UICollectionReusableView { + public static func dequeue(from collectionView: UICollectionView, of kind: String, for indexPath: IndexPath, with dependency:Dependency) -> Self { + let view = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: Self.reusableIdentifier, for: indexPath) as! Self + view.inject(dependency) + return view + } + } + + public extension Reusable where Self: UICollectionReusableView, Self.Dependency == Void { + public static func dequeue(from collectionView: UICollectionView, of kind: String, for indexPath: IndexPath) -> Self { + return dequeue(from: collectionView, of: kind, for: indexPath, with: ()) + } + } + + public extension UICollectionView { + public func register(type: C.Type) where C: Reusable { + register(C.self, forCellWithReuseIdentifier: C.reusableIdentifier) + } + + public func registerNib(type: C.Type) where C: Reusable, C: NibType { + register(C.nib, forCellWithReuseIdentifier: C.reusableIdentifier) + } + } + + public extension UICollectionView { + public func register(type: C.Type, forSupplementaryViewOf kind: String) where C: Reusable { + register(C.self, forSupplementaryViewOfKind: kind, withReuseIdentifier: C.reusableIdentifier) + } + + public func registerNib(type: C.Type, forSupplementaryViewOf kind: String) where C: Reusable, C: NibType { + register(C.nib, forSupplementaryViewOfKind: kind, withReuseIdentifier: C.reusableIdentifier) + } + } + +#endif + diff --git a/Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Reusable+UITableView.swift b/Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Reusable+UITableView.swift new file mode 100644 index 0000000..35403ad --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Reusable+UITableView.swift @@ -0,0 +1,61 @@ +// +// Reusable+UITableView.swift +// Instantiate +// +// Created by tarunon on 2017/06/11. +// + +#if os(iOS) || os(tvOS) + + import UIKit + + public extension Reusable where Self: UITableViewCell { + public static func dequeue(from tableView: UITableView, for indexPath: IndexPath, with dependency:Dependency) -> Self { + let cell = tableView.dequeueReusableCell(withIdentifier: Self.reusableIdentifier, for: indexPath) as! Self + cell.inject(dependency) + return cell + } + } + + public extension Reusable where Self: UITableViewCell, Self.Dependency == Void { + public static func dequeue(from tableView: UITableView, for indexPath: IndexPath) -> Self { + return dequeue(from: tableView, for: indexPath, with: ()) + } + } + + public extension Reusable where Self: UITableViewHeaderFooterView { + public static func dequeue(from tableView: UITableView, with dependency:Dependency) -> Self { + let view = tableView.dequeueReusableHeaderFooterView(withIdentifier: Self.reusableIdentifier) as! Self + view.inject(dependency) + return view + } + } + + public extension Reusable where Self: UITableViewHeaderFooterView, Self.Dependency == Void { + public static func dequeue(from tableView: UITableView) -> Self { + return dequeue(from: tableView, with: ()) + } + } + + public extension UITableView { + public func register(type: C.Type) where C: Reusable { + register(C.self, forCellReuseIdentifier: C.reusableIdentifier) + } + + public func registerNib(type: C.Type) where C: Reusable, C: NibType { + register(C.nib, forCellReuseIdentifier: C.reusableIdentifier) + } + } + + public extension UITableView { + public func register(type: C.Type) where C: Reusable { + register(C.self, forHeaderFooterViewReuseIdentifier: C.reusableIdentifier) + } + + public func registerNib(type: C.Type) where C: Reusable, C: NibType { + register(C.nib, forHeaderFooterViewReuseIdentifier: C.reusableIdentifier) + } + } + +#endif + diff --git a/Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Storyboard+UIViewController.swift b/Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Storyboard+UIViewController.swift new file mode 100644 index 0000000..e62b398 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/Instantiate/iOS/Storyboard+UIViewController.swift @@ -0,0 +1,29 @@ +// +// Storyboard+UIViewController.swift +// Instantiate +// +// Created by tarunon on 2017/06/11. +// + +#if os(iOS) || os(tvOS) + + import UIKit + + public extension StoryboardInstantiatable where Self: UIViewController { + public init(with dependency:Dependency) { + let storyboard = (Self.self as StoryboardType.Type).storyboard + switch Self.instantiateSource { + case .initial: + self = storyboard.instantiateInitialViewController() as! Self + case .identifier(let identifier): + self = storyboard.instantiateViewController(withIdentifier: identifier) as! Self + } + if self is ViewLoadBeforeInject { + _ = self.view + } + self.inject(dependency) + } + } + +#endif + diff --git a/Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Nib+NSView.swift b/Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Nib+NSView.swift new file mode 100644 index 0000000..e0a35d2 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Nib+NSView.swift @@ -0,0 +1,48 @@ +// +// Nib+NSView.swift +// Instantiate +// +// Created by tarunon on 2017/06/11. +// + +#if os(macOS) + + import AppKit + + public extension NibInstantiatable where Self: NSView { + init(with dependency: Dependency) { + var objects: NSArray? = NSArray() + Self.nib.instantiate(withOwner: nil, topLevelObjects: &objects) + self = objects!.filter { !($0 is NSApplication) }[Self.instantiateIndex] as! Self + self.inject(dependency) + } + } + + public extension NibInstantiatableWrapper where Self: NSView, Wrapped: NSView { + var view: Wrapped { + return self.subviews.first as! Wrapped + } + + var viewIfLoaded: Wrapped? { + return self.subviews.first as? Wrapped + } + + func loadView(with dependency: Wrapped.Dependency) { + let view = Wrapped(with: dependency) + if translatesAutoresizingMaskIntoConstraints { + view.translatesAutoresizingMaskIntoConstraints = true + view.autoresizingMask = [.width, .height] + view.frame = self.bounds + self.addSubview(view, positioned: .above, relativeTo: self.subviews.first) + } else { + view.translatesAutoresizingMaskIntoConstraints = false + self.addSubview(view, positioned: .above, relativeTo: self.subviews.first) + view.topAnchor.constraint(equalTo: self.topAnchor).isActive = true + view.bottomAnchor.constraint(equalTo: self.bottomAnchor).isActive = true + view.leftAnchor.constraint(equalTo: self.leftAnchor).isActive = true + view.rightAnchor.constraint(equalTo: self.rightAnchor).isActive = true + } + } + } + +#endif diff --git a/Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Nib+NSViewController.swift b/Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Nib+NSViewController.swift new file mode 100644 index 0000000..8494c1d --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Nib+NSViewController.swift @@ -0,0 +1,25 @@ +// +// Nib+NSViewController.swift +// Instantiate +// +// Created by tarunon on 2017/07/07. +// +// + +#if os(macOS) + + import AppKit + + public extension NibInstantiatable where Self: NSViewController { + init(with dependency: Dependency) { + let nibName = (Self.self as NibType.Type).nibName + let nibBundle = (Self.self as NibType.Type).nibBundle + self = Self(nibName: nibName, bundle: nibBundle) + if self is ViewLoadBeforeInject { + _ = self.view + } + self.inject(dependency) + } + } + +#endif diff --git a/Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Reusable+NSCollectionView.swift b/Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Reusable+NSCollectionView.swift new file mode 100644 index 0000000..afb9f85 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Reusable+NSCollectionView.swift @@ -0,0 +1,59 @@ +// +// Reusable+NSCollectionView.swift +// Instantiate +// +// Created by tarunon on 2017/06/11. +// + +#if os(macOS) + + import AppKit + + public extension Reusable where Self: NSCollectionViewItem { + static func dequeue(from collectionView: NSCollectionView, for indexPath: IndexPath, with dependency: Dependency) -> Self { + let cell = collectionView.makeItem(withIdentifier: Self.reusableIdentifier, for: indexPath) as! Self + cell.inject(dependency) + return cell + } + } + + public extension Reusable where Self: NSCollectionViewItem, Dependency == Void { + static func dequeue(from collectionView: NSCollectionView, for indexPath: IndexPath) -> Self { + return dequeue(from: collectionView, for: indexPath, with: ()) + } + } + + public extension Reusable where Self: NSView { + static func dequeue(from collectionView: NSCollectionView, of kind: NSCollectionView.SupplementaryElementKind, for indexPath: IndexPath, with dependency: Dependency) -> Self { + let view = collectionView.makeSupplementaryView(ofKind: kind, withIdentifier: Self.reusableIdentifier, for: indexPath) as! Self + view.inject(dependency) + return view + } + } + + public extension Reusable where Self: NSView, Dependency == Void { + static func dequeue(from collectionView: NSCollectionView, of kind: NSCollectionView.SupplementaryElementKind, for indexPath: IndexPath) -> Self { + return dequeue(from: collectionView, of: kind, for: indexPath, with: ()) + } + } + + public extension NSCollectionView { + func register(type: C.Type) where C: Reusable { + register(C.self, forItemWithIdentifier: C.reusableIdentifier) + } + + func registerNib(type: C.Type) where C: Reusable, C: NibType { + register(C.nib, forItemWithIdentifier: C.reusableIdentifier) + } + + func register(type: C.Type, forSupplementaryViewOf kind: SupplementaryElementKind) where C: Reusable { + register(C.self, forSupplementaryViewOfKind: kind, withIdentifier: C.reusableIdentifier) + } + + func registerNib(type: C.Type, forSupplementaryViewOf kind: SupplementaryElementKind) where C: Reusable, C: NibType { + register(C.nib, forSupplementaryViewOfKind: kind, withIdentifier: C.reusableIdentifier) + } + } + +#endif + diff --git a/Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Reusable+NSTableView.swift b/Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Reusable+NSTableView.swift new file mode 100644 index 0000000..51b5c53 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Reusable+NSTableView.swift @@ -0,0 +1,32 @@ +// +// Reusable+NSTableView.swift +// Instantiate +// +// Created by tarunon on 2017/06/11. +// + +#if os(macOS) + + import AppKit + + public extension Reusable where Self: NSView { + static func dequeue(from tableView: NSTableView, with dependency: Dependency) -> Self { + let view = tableView.makeView(withIdentifier: Self.reusableIdentifier, owner: nil) as! Self + view.inject(dependency) + return view + } + } + + public extension Reusable where Self: NSView, Dependency == Void { + static func dequeue(from tableView: NSTableView) -> Self { + return dequeue(from: tableView, with: ()) + } + } + + public extension NSTableView { + func registerNib(type: C.Type) where C: Reusable, C: NibType { + register(C.nib, forIdentifier: C.reusableIdentifier) + } + } + +#endif diff --git a/Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Storyboard+NSViewController.swift b/Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Storyboard+NSViewController.swift new file mode 100644 index 0000000..e5f2c9e --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/Instantiate/macOS/Storyboard+NSViewController.swift @@ -0,0 +1,29 @@ +// +// Storyboard+NSViewController.swift +// Instantiate +// +// Created by tarunon on 2017/06/11. +// + +#if os(macOS) + + import AppKit + + public extension StoryboardInstantiatable where Self: NSViewController { + init(with dependency: Dependency) { + let storyboard = (Self.self as StoryboardType.Type).storyboard + switch Self.instantiateSource { + case .initial: + self = storyboard.instantiateInitialController() as! Self + case .identifier(let identifier): + self = storyboard.instantiateController(withIdentifier: identifier) as! Self + } + if self is ViewLoadBeforeInject { + _ = self.view + } + self.inject(dependency) + } + } + +#endif + diff --git a/Carthage/Checkouts/Instantiate/Sources/InstantiateStandard/Deprecated.swift b/Carthage/Checkouts/Instantiate/Sources/InstantiateStandard/Deprecated.swift new file mode 100644 index 0000000..4fbc8cb --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/InstantiateStandard/Deprecated.swift @@ -0,0 +1,14 @@ +// +// Deprecated.swift +// Instantiate +// +// Created by ST90872 on 2017/06/15. +// + +import Foundation +import Instantiate + +@available(*, deprecated, renamed: "IdentifierType.from") +public func identifier(of type: NSObjectProtocol.Type) -> I { + return I.from(type.className) +} diff --git a/Carthage/Checkouts/Instantiate/Sources/InstantiateStandard/Extensions.swift b/Carthage/Checkouts/Instantiate/Sources/InstantiateStandard/Extensions.swift new file mode 100644 index 0000000..60ed2e4 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Sources/InstantiateStandard/Extensions.swift @@ -0,0 +1,67 @@ +// +// Extensions.swift +// Instantiate +// +// Created by tarunon on 2016/12/05. +// Copyright © 2016 tarunon. All rights reserved. +// + +import Foundation +import Instantiate + +extension NSObjectProtocol { + static var className: String { + return NSStringFromClass(self).components(separatedBy: ".").last! + } + + static var bundle: Bundle { + return Bundle(for: self) + } +} + +extension IdentifierType { + public static func from(_ type: NSObjectProtocol.Type) -> Self { + return Self.from(type.className) + } +} + +#if os(iOS) || os(tvOS) + + import UIKit + + public extension StoryboardType where Self: NSObjectProtocol { + public static var storyboardName: StoryboardName { + return .from(self) + } + } + + public extension NibType where Self: NSObjectProtocol { + public static var nibName: NibName { + return .from(self) + } + } + +#endif + +#if os(macOS) + import AppKit + + public extension StoryboardType where Self: NSObjectProtocol { + static var storyboardName: StoryboardName { + return .from(self) + } + } + + public extension NibType where Self: NSObjectProtocol { + static var nibName: NibName { + return .from(self) + } + } + +#endif + +public extension Reusable where Self: NSObjectProtocol { + static var reusableIdentifier: Instantiate.UserInterfaceItemIdentifier { + return .from(self) + } +} diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/CopyBundleResources.sh b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/CopyBundleResources.sh new file mode 100755 index 0000000..5de4761 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/CopyBundleResources.sh @@ -0,0 +1,24 @@ +# check platform +if [ $PLATFORM_NAME = "iphonesimulator" ]; then + platform=`echo iOS` + device=`echo iphone` +elif [ $PLATFORM_NAME = "macosx" ]; then + platform=`echo macOS` + device=`echo mac` +elif [ $PLATFORM_NAME = "appletvsimulator" ]; then + platform=`echo tvOS` + device=`echo tv` +else + exit 1 +fi +# compile xib +for filename in `find $PROJECT_DIR/Tests/$PRODUCT_MODULE_NAME/$platform -name "*.xib"`; do + name=`basename $filename .xib` + ibtool --errors --warnings --notices --module $PRODUCT_MODULE_NAME --output-partial-info-plist $TARGET_TEMP_DIR/$name-PartialInfo.plist --auto-activate-custom-fonts --target-device $device --minimum-deployment-target $DEPLOYMENT_TARGET_CLANG_ENV_NAME --output-format human-readable-text --compile $CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/$name.nib $PROJECT_DIR/Tests/$PRODUCT_MODULE_NAME/$platform/$name.xib +done +# compile, link storyboard +for filename in `find $PROJECT_DIR/Tests/$PRODUCT_MODULE_NAME/$platform -name "*.storyboard"`; do + name=`basename $filename .storyboard` + ibtool --errors --warnings --notices --module $PRODUCT_MODULE_NAME --output-partial-info-plist $TARGET_TEMP_DIR/$name-SBPartialInfo.plist --auto-activate-custom-fonts --target-device $device --minimum-deployment-target $DEPLOYMENT_TARGET_CLANG_ENV_NAME --output-format human-readable-text --compilation-directory $TEMP_FILE_DIR $PROJECT_DIR/Tests/$PRODUCT_MODULE_NAME/$platform/ViewController.storyboard + ibtool --errors --warnings --notices --module $PRODUCT_MODULE_NAME --target-device $device --minimum-deployment-target $DEPLOYMENT_TARGET_CLANG_ENV_NAME --output-format human-readable-text --link $CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH $TEMP_FILE_DIR/ViewController.storyboardc +done diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/InstantiateTests.swift b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/InstantiateTests.swift new file mode 100644 index 0000000..f9d0703 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/InstantiateTests.swift @@ -0,0 +1,180 @@ +// +// InstantiateTests.swift +// InstantiateTests +// +// Created by tarunon on 2017/01/29. +// Copyright © 2017年 tarunon. All rights reserved. +// + +#if os(iOS) || os(tvOS) + import UIKit +#endif +#if os(macOS) + import AppKit + extension NSTextField { + var text: String? { + return stringValue + } + } +#endif + +import XCTest +import Instantiate + +class InstantiateTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testNibInstantiatable() { + let parameter = 314 + let view = View(with: parameter) + XCTAssertEqual(view.parameter, parameter) + } + + func testStoryboardInstantiatable() { + let label = "Hello world" + let vc = ViewController(with: label) + XCTAssertEqual(vc.label.text, label) + } + + func testNibinstantiatableWrapper() { + let vc2 = ViewController2(with: ()) + XCTAssertEqual(vc2.viewWrapper.view.parameter, 271) + } + + func testReusableForTableView() { + let vc3 = ViewController3(with: (header: "VC3", items: [1, 2, 3, 4])) + #if os(iOS) || os(tvOS) + let tableCells: [TableViewCell] = + [ + vc3.tableView.cellForRow(at: IndexPath(row: 0, section: 0)), + vc3.tableView.cellForRow(at: IndexPath(row: 1, section: 0)), + vc3.tableView.cellForRow(at: IndexPath(row: 2, section: 0)), + vc3.tableView.cellForRow(at: IndexPath(row: 3, section: 0)) + ] + .compactMap { $0 as? TableViewCell } + #endif + #if os(macOS) + let tableCells: [TableViewCell] = + [ + vc3.tableView.view(atColumn: 0, row: 0, makeIfNecessary: true), + vc3.tableView.view(atColumn: 0, row: 1, makeIfNecessary: true), + vc3.tableView.view(atColumn: 0, row: 2, makeIfNecessary: true), + vc3.tableView.view(atColumn: 0, row: 3, makeIfNecessary: true) + ] + .compactMap { $0 as? TableViewCell } + #endif + XCTAssertEqual(tableCells[0].label.text, "1") + XCTAssertEqual(tableCells[1].label.text, "2") + XCTAssertEqual(tableCells[2].label.text, "3") + XCTAssertEqual(tableCells[3].label.text, "4") + #if os(iOS) || os(tvOS) + let tableHeader: TableViewHeader = vc3.tableView.headerView(forSection: 0) as! TableViewHeader + XCTAssertEqual(tableHeader.label.text, "VC3") + #endif + } + + func testReusableForCollectionView() { + let vc4 = ViewController4(with: [(header: "A", items: ["a", "b", "c", "d"]), (header: "B", items: ["x", "y", "z"])]) + #if os(iOS) || os(tvOS) + vc4.collectionView.layoutIfNeeded() + #endif + #if os(macOS) + vc4.collectionView.layout() + #endif + + #if os(iOS) || os(tvOS) + let headers: [CollectionReusableView] = + [ + vc4.collectionView.supplementaryView(forElementKind: UICollectionElementKindSectionHeader, at: IndexPath(item: 0, section: 0)), + vc4.collectionView.supplementaryView(forElementKind: UICollectionElementKindSectionHeader, at: IndexPath(item: 0, section: 1)) + ] + .compactMap { $0 as? CollectionReusableView } + #endif + #if os(macOS) + let headers: [CollectionReusableView] = + [ + vc4.collectionView.supplementaryView(forElementKind: NSCollectionView.elementKindSectionHeader, at: IndexPath(item: 0, section: 0)), + vc4.collectionView.supplementaryView(forElementKind: NSCollectionView.elementKindSectionHeader, at: IndexPath(item: 0, section: 1)) + ] + .compactMap { $0 as? CollectionReusableView } + #endif + #if os(iOS) || os(tvOS) + let collectionCells = + [ + [ + vc4.collectionView.cellForItem(at: IndexPath(item: 0, section: 0)), + vc4.collectionView.cellForItem(at: IndexPath(item: 1, section: 0)), + vc4.collectionView.cellForItem(at: IndexPath(item: 2, section: 0)), + vc4.collectionView.cellForItem(at: IndexPath(item: 3, section: 0)) + ] + .compactMap { $0 as? CollectionViewCell }, + [ + vc4.collectionView.cellForItem(at: IndexPath(item: 0, section: 1)), + vc4.collectionView.cellForItem(at: IndexPath(item: 1, section: 1)), + vc4.collectionView.cellForItem(at: IndexPath(item: 2, section: 1)) + ] + .compactMap { $0 as? CollectionViewCell }, + ] + #endif + #if os(macOS) + let collectionCells = + [ + [ + vc4.collectionView.item(at: IndexPath(item: 0, section: 0)), + vc4.collectionView.item(at: IndexPath(item: 1, section: 0)), + vc4.collectionView.item(at: IndexPath(item: 2, section: 0)), + vc4.collectionView.item(at: IndexPath(item: 3, section: 0)) + ] + .compactMap { $0 as? CollectionViewCell }, + [ + vc4.collectionView.item(at: IndexPath(item: 0, section: 1)), + vc4.collectionView.item(at: IndexPath(item: 1, section: 1)), + vc4.collectionView.item(at: IndexPath(item: 2, section: 1)) + ] + .compactMap { $0 as? CollectionViewCell }, + ] + #endif + XCTAssertEqual(headers[0].label.text, "A") + XCTAssertEqual(headers[1].label.text, "B") + XCTAssertEqual(collectionCells[0][0].label.text, "a") + XCTAssertEqual(collectionCells[0][1].label.text, "b") + XCTAssertEqual(collectionCells[0][2].label.text, "c") + XCTAssertEqual(collectionCells[0][3].label.text, "d") + XCTAssertEqual(collectionCells[1][0].label.text, "x") + XCTAssertEqual(collectionCells[1][1].label.text, "y") + XCTAssertEqual(collectionCells[1][2].label.text, "z") + } + + func testSubclass() { + let parameter = 141 + let view = SubclassView(with: parameter) + XCTAssertTrue(view.classForCoder is SubclassView.Type) + XCTAssertEqual(view.parameter, parameter) + XCTAssertEqual(view.subclassParameter, parameter) + } + + func testNibViewController() { + let parameter = "NibViewController" + let viewController = NibViewController(with: parameter) + XCTAssertEqual(viewController.label.text, parameter) + } + + static var allTests = [ + ("testNibInstantiatable", testNibInstantiatable), + ("testStoryboardInstantiatable", testStoryboardInstantiatable), + ("testNibinstantiatableWrapper", testNibinstantiatableWrapper), + ("testReusableForTableView", testReusableForTableView), + ("testReusableForCollectionView", testReusableForCollectionView), + ("testSubclass", testSubclass), + ("testNibViewController", testNibViewController) + ] +} diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/CollectionReusableView.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/CollectionReusableView.xib new file mode 100644 index 0000000..22366d0 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/CollectionReusableView.xib @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/CollectionViewCell.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/CollectionViewCell.xib new file mode 100644 index 0000000..487ceec --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/CollectionViewCell.xib @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/NibViewController.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/NibViewController.xib new file mode 100644 index 0000000..7e3064c --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/NibViewController.xib @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/Resources-iOS.swift b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/Resources-iOS.swift new file mode 100644 index 0000000..301ec9e --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/Resources-iOS.swift @@ -0,0 +1,218 @@ +// +// Resources-iOS.swift +// Instantiate +// +// Created by tarunon on 2017/01/29. +// Copyright © 2017 tarunon. All rights reserved. +// + +#if os(iOS) + +import Instantiate +import InstantiateStandard + +import UIKit + +extension UIViewController: ViewLoadBeforeInject { + +} + +class View: UIView, NibInstantiatable { + typealias Dependency = Int + var parameter: Int! + + func inject(_ dependency: Int) { + self.parameter = dependency + } +} + +class SubclassView: View { + var subclassParameter: Int! + + override func inject(_ dependency: Int) { + super.inject(dependency) + self.subclassParameter = dependency + } +} + +class ViewController: UIViewController, StoryboardInstantiatable { + typealias Dependency = String + + func inject(_ dependency: String) { + self.label.text = dependency + } + + @IBOutlet weak var label: UILabel! + + override func viewDidLoad() { + super.viewDidLoad() + } +} + +// Notes: IBDesignable doesn't work if import XCTest in same bundle +// @IBDesignable +class ViewWrapper: UIView, NibInstantiatableWrapper { + typealias Wrapped = View + @IBInspectable var parameter: Int = 0 { + didSet { + viewIfLoaded?.inject(parameter) + } + } + + override func awakeFromNib() { + super.awakeFromNib() + loadView(with: parameter) + } + + override func prepareForInterfaceBuilder() { + super.prepareForInterfaceBuilder() + loadView(with: parameter) + } +} + +class ViewController2: UIViewController, StoryboardInstantiatable { + typealias Parameter = Void + @IBOutlet weak var viewWrapper: ViewWrapper! + + static var storyboard: UIStoryboard = ViewController.storyboard + static var instantiateSource: InstantiateSource { return .identifier(.from(ViewController2.self)) } +} + +class TableViewCell: UITableViewCell, Reusable, NibType { + typealias Dependency = Int + @IBOutlet weak var label: UILabel! + + func inject(_ dependency: Int) { + label.text = "\(dependency)" + } +} + +class TableViewHeader: UITableViewHeaderFooterView, Reusable, NibType { + typealias Dependency = String + @IBOutlet weak var label: UILabel! + + func inject(_ dependency: String) { + label.text = dependency + } +} + +class ViewController3: UIViewController, StoryboardInstantiatable { + typealias Dependency = (header: String, items: [Int]) + var dataSource: Dependency = (header: "", items: []) + + static var storyboard: UIStoryboard = ViewController.storyboard + static var instantiateSource: InstantiateSource { return .identifier(.from(ViewController3.self)) } + + @IBOutlet weak var tableView: UITableView! { + didSet { + tableView.registerNib(type: TableViewCell.self) + tableView.registerNib(type: TableViewHeader.self) + } + } + + func inject(_ dependency: (header: String, items: [Int])) { + dataSource = dependency + tableView.reloadData() + } +} + +extension ViewController3: UITableViewDelegate, UITableViewDataSource { + func numberOfSections(in tableView: UITableView) -> Int { + return 1 + } + + func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { + return TableViewHeader.dequeue(from: tableView, with: dataSource.header) + } + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return dataSource.items.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + return TableViewCell.dequeue(from: tableView, for: indexPath, with: dataSource.items[indexPath.row]) + } + + func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { + return 44 + } + + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 44 + } +} + +class CollectionViewCell: UICollectionViewCell, Reusable, NibType { + typealias Dependency = String + @IBOutlet weak var label: UILabel! + + func inject(_ dependency: String) { + label.text = dependency + } +} + +class CollectionReusableView: UICollectionReusableView, Reusable, NibType { + typealias Dependency = String + @IBOutlet weak var label: UILabel! + + func inject(_ dependency: String) { + label.text = dependency + } +} + +class ViewController4: UIViewController, StoryboardInstantiatable { + typealias Dependency = [(header: String, items: [String])] + var dataSource = [(header: String, items: [String])]() + + static var storyboard: UIStoryboard = ViewController.storyboard + static var instantiateSource: InstantiateSource { return .identifier(.from(ViewController4.self)) } + + @IBOutlet weak var collectionView: UICollectionView! { + didSet { + collectionView.registerNib(type: CollectionViewCell.self) + collectionView.registerNib(type: CollectionReusableView.self, forSupplementaryViewOf: UICollectionElementKindSectionHeader) + } + } + + func inject(_ dependency: [(header: String, items: [String])]) { + dataSource = dependency + collectionView.reloadData() + } +} + +extension ViewController4: UICollectionViewDelegateFlowLayout, UICollectionViewDataSource { + func numberOfSections(in collectionView: UICollectionView) -> Int { + return dataSource.count + } + + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return dataSource[section].items.count + } + + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { + return CGSize(width: 100.0, height: 100.0) + } + + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize { + return CGSize(width: collectionView.frame.width, height: 50.0) + } + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + return CollectionViewCell.dequeue(from: collectionView, for: indexPath, with: dataSource[indexPath.section].items[indexPath.item]) + } + + func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView { + return CollectionReusableView.dequeue(from: collectionView, of: kind, for: indexPath, with: dataSource[indexPath.section].header) + } +} + +class NibViewController: UIViewController, NibInstantiatable { + + @IBOutlet var label: UILabel! + + func inject(_ dependency: String) { + label.text = dependency + } +} + +#endif diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/SubclassView.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/SubclassView.xib new file mode 100644 index 0000000..49fbb4e --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/SubclassView.xib @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/TableViewCell.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/TableViewCell.xib new file mode 100644 index 0000000..a89e442 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/TableViewCell.xib @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/TableViewHeader.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/TableViewHeader.xib new file mode 100644 index 0000000..bd1d3fd --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/TableViewHeader.xib @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/View.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/View.xib new file mode 100644 index 0000000..7acc7ae --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/View.xib @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/ViewController.storyboard b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/ViewController.storyboard new file mode 100644 index 0000000..b157f81 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/iOS/ViewController.storyboard @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/CollectionReusableView.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/CollectionReusableView.xib new file mode 100644 index 0000000..f6ccc9b --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/CollectionReusableView.xib @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/CollectionViewCell.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/CollectionViewCell.xib new file mode 100644 index 0000000..698b34e --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/CollectionViewCell.xib @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/NibViewController.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/NibViewController.xib new file mode 100644 index 0000000..65b9bb3 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/NibViewController.xib @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/Resources-macOS.swift b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/Resources-macOS.swift new file mode 100644 index 0000000..155862d --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/Resources-macOS.swift @@ -0,0 +1,196 @@ +// +// Resources-macOS.swift +// Instantiate +// +// Created by tarunon on 2017/01/29. +// Copyright © 2017 tarunon. All rights reserved. +// + +#if os(macOS) + +import Instantiate +import InstantiateStandard +import AppKit + +extension NSViewController: ViewLoadBeforeInject { + +} + +class View: NSView, NibInstantiatable { + typealias Dependency = Int + var parameter: Int! + + func inject(_ dependency: Int) { + self.parameter = dependency + } +} + +class SubclassView: View { + var subclassParameter: Int! + + override func inject(_ dependency: Int) { + super.inject(dependency) + self.subclassParameter = dependency + } +} + +class ViewController: NSViewController, StoryboardInstantiatable { + typealias Dependency = String + + func inject(_ dependency: String) { + self.label.stringValue = dependency + } + + @IBOutlet weak var label: NSTextField! + + override func viewDidLoad() { + super.viewDidLoad() + } +} + +// Notes: IBDesignable doesn't work if import XCTest in same bundle +// @IBDesignable +class ViewWrapper: NSView, NibInstantiatableWrapper { + typealias Wrapped = View + @IBInspectable var parameter: Int = 0 { + didSet { + viewIfLoaded?.inject(parameter) + } + } + + override func awakeFromNib() { + super.awakeFromNib() + loadView(with: parameter) + } + + override func prepareForInterfaceBuilder() { + super.prepareForInterfaceBuilder() + loadView(with: parameter) + } +} + +class ViewController2: NSViewController, StoryboardInstantiatable { + typealias Parameter = Void + @IBOutlet weak var viewWrapper: ViewWrapper! + + static var storyboard: NSStoryboard = ViewController.storyboard + static var instantiateSource: InstantiateSource { return .identifier(.from(ViewController2.self)) } +} + +class TableViewCell: NSView, Reusable, NibType { + typealias Dependency = Int + @IBOutlet weak var label: NSTextField! + + func inject(_ dependency: Int) { + label.stringValue = "\(dependency)" + } +} + +class ViewController3: NSViewController, StoryboardInstantiatable { + typealias Dependency = (header: String, items: [Int]) + var dataSource: Dependency = (header: "", items: []) + + static var storyboard: NSStoryboard = ViewController.storyboard + static var instantiateSource: InstantiateSource { return .identifier(.from(ViewController3.self)) } + + @IBOutlet weak var tableView: NSTableView! { + didSet { + tableView.registerNib(type: TableViewCell.self) + } + } + + func inject(_ dependency: (header: String, items: [Int])) { + dataSource = dependency + tableView.reloadData() + } +} + +extension ViewController3: NSTableViewDelegate, NSTableViewDataSource { + func numberOfRows(in tableView: NSTableView) -> Int { + return dataSource.items.count + } + + func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? { + return TableViewCell.dequeue(from: tableView, with: dataSource.items[row]) + } + + func tableView(_ tableView: NSTableView, heightOfRow row: Int) -> CGFloat { + return 44 + } +} + +class CollectionViewCell: NSCollectionViewItem, Reusable, NibType { + typealias Dependency = String + @IBOutlet weak var label: NSTextField! + + func inject(_ dependency: String) { + label.stringValue = dependency + } +} + +class CollectionReusableView: NSView, Reusable, NibType { + typealias Dependency = String + @IBOutlet weak var label: NSTextField! + + func inject(_ dependency: String) { + label.stringValue = dependency + } +} + +class ViewController4: NSViewController, StoryboardInstantiatable { + typealias Dependency = [(header: String, items: [String])] + var dataSource = [(header: String, items: [String])]() + + static var storyboard: NSStoryboard = ViewController.storyboard + static var instantiateSource: InstantiateSource { return .identifier(.from(ViewController4.self)) } + + @IBOutlet weak var collectionView: NSCollectionView! { + didSet { + collectionView.registerNib(type: CollectionViewCell.self) + collectionView.registerNib(type: CollectionReusableView.self, forSupplementaryViewOf: NSCollectionView.elementKindSectionHeader) + collectionView.delegate = self + collectionView.dataSource = self + } + } + + func inject(_ dependency: [(header: String, items: [String])]) { + dataSource = dependency + collectionView.reloadData() + } +} + +extension ViewController4: NSCollectionViewDelegateFlowLayout, NSCollectionViewDataSource { + func numberOfSections(in collectionView: NSCollectionView) -> Int { + return dataSource.count + } + + func collectionView(_ collectionView: NSCollectionView, numberOfItemsInSection section: Int) -> Int { + return dataSource[section].items.count + } + + func collectionView(_ collectionView: NSCollectionView, layout collectionViewLayout: NSCollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { + return CGSize(width: 100.0, height: 100.0) + } + + func collectionView(_ collectionView: NSCollectionView, layout collectionViewLayout: NSCollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize { + return CGSize(width: collectionView.frame.width, height: 50.0) + } + + func collectionView(_ collectionView: NSCollectionView, itemForRepresentedObjectAt indexPath: IndexPath) -> NSCollectionViewItem { + return CollectionViewCell.dequeue(from: collectionView, for: indexPath, with: dataSource[indexPath.section].items[indexPath.item]) + } + func collectionView(_ collectionView: NSCollectionView, viewForSupplementaryElementOfKind kind: NSCollectionView.SupplementaryElementKind, at indexPath: IndexPath) -> NSView { + return CollectionReusableView.dequeue(from: collectionView, of: kind, for: indexPath, with: dataSource[indexPath.section].header) + } +} + +class NibViewController: NSViewController, NibInstantiatable { + + @IBOutlet weak var label: NSTextField! + + func inject(_ dependency: String) { + label.stringValue = dependency + } +} + +#endif diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/SubclassView.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/SubclassView.xib new file mode 100644 index 0000000..09b25b1 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/SubclassView.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/TableViewCell.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/TableViewCell.xib new file mode 100644 index 0000000..b1ca7ec --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/TableViewCell.xib @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/View.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/View.xib new file mode 100644 index 0000000..bdf5c7d --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/View.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/ViewController.storyboard b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/ViewController.storyboard new file mode 100644 index 0000000..ccb7974 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/macOS/ViewController.storyboard @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/CollectionReusableView.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/CollectionReusableView.xib new file mode 100644 index 0000000..820fef6 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/CollectionReusableView.xib @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/CollectionViewCell.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/CollectionViewCell.xib new file mode 100644 index 0000000..a017626 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/CollectionViewCell.xib @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/NibViewController.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/NibViewController.xib new file mode 100644 index 0000000..bbe090b --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/NibViewController.xib @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/Resoources-tvOS.swift b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/Resoources-tvOS.swift new file mode 100644 index 0000000..b4a62d6 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/Resoources-tvOS.swift @@ -0,0 +1,218 @@ +// +// Resoources-tvOS.swift +// Instantiate +// +// Created by tarunon on 2017/06/14. +// Copyright © 2017 tarunon. All rights reserved. +// + +#if os(tvOS) + +import Instantiate +import InstantiateStandard + +import UIKit + +extension UIViewController: ViewLoadBeforeInject { + +} + +class View: UIView, NibInstantiatable { + typealias Dependency = Int + var parameter: Int! + + func inject(_ dependency: Int) { + self.parameter = dependency + } +} + +class SubclassView: View { + var subclassParameter: Int! + + override func inject(_ dependency: Int) { + super.inject(dependency) + self.subclassParameter = dependency + } +} + +class ViewController: UIViewController, StoryboardInstantiatable { + typealias Dependency = String + + func inject(_ dependency: String) { + self.label.text = dependency + } + + @IBOutlet weak var label: UILabel! + + override func viewDidLoad() { + super.viewDidLoad() + } +} + +// Notes: IBDesignable doesn't work if import XCTest in same bundle +// @IBDesignable +class ViewWrapper: UIView, NibInstantiatableWrapper { + typealias Wrapped = View + @IBInspectable var parameter: Int = 0 { + didSet { + viewIfLoaded?.inject(parameter) + } + } + + override func awakeFromNib() { + super.awakeFromNib() + loadView(with: parameter) + } + + override func prepareForInterfaceBuilder() { + super.prepareForInterfaceBuilder() + loadView(with: parameter) + } +} + +class ViewController2: UIViewController, StoryboardInstantiatable { + typealias Parameter = Void + @IBOutlet weak var viewWrapper: ViewWrapper! + + static var storyboard: UIStoryboard = ViewController.storyboard + static var instantiateSource: InstantiateSource { return .identifier(.from(ViewController2.self)) } +} + +class TableViewCell: UITableViewCell, Reusable, NibType { + typealias Dependency = Int + @IBOutlet weak var label: UILabel! + + func inject(_ dependency: Int) { + label.text = "\(dependency)" + } +} + +class TableViewHeader: UITableViewHeaderFooterView, Reusable, NibType { + typealias Dependency = String + @IBOutlet weak var label: UILabel! + + func inject(_ dependency: String) { + label.text = dependency + } +} + +class ViewController3: UIViewController, StoryboardInstantiatable { + typealias Dependency = (header: String, items: [Int]) + var dataSource: Dependency = (header: "", items: []) + + static var storyboard: UIStoryboard = ViewController.storyboard + static var instantiateSource: InstantiateSource { return .identifier(.from(ViewController3.self)) } + + @IBOutlet weak var tableView: UITableView! { + didSet { + tableView.registerNib(type: TableViewCell.self) + tableView.registerNib(type: TableViewHeader.self) + } + } + + func inject(_ dependency: (header: String, items: [Int])) { + dataSource = dependency + tableView.reloadData() + } +} + +extension ViewController3: UITableViewDelegate, UITableViewDataSource { + func numberOfSections(in tableView: UITableView) -> Int { + return 1 + } + + func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { + return TableViewHeader.dequeue(from: tableView, with: dataSource.header) + } + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return dataSource.items.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + return TableViewCell.dequeue(from: tableView, for: indexPath, with: dataSource.items[indexPath.row]) + } + + func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { + return 44 + } + + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 44 + } +} + +class CollectionViewCell: UICollectionViewCell, Reusable, NibType { + typealias Dependency = String + @IBOutlet weak var label: UILabel! + + func inject(_ dependency: String) { + label.text = dependency + } +} + +class CollectionReusableView: UICollectionReusableView, Reusable, NibType { + typealias Dependency = String + @IBOutlet weak var label: UILabel! + + func inject(_ dependency: String) { + label.text = dependency + } +} + +class ViewController4: UIViewController, StoryboardInstantiatable { + typealias Dependency = [(header: String, items: [String])] + var dataSource = [(header: String, items: [String])]() + + static var storyboard: UIStoryboard = ViewController.storyboard + static var instantiateSource: InstantiateSource { return .identifier(.from(ViewController4.self)) } + + @IBOutlet weak var collectionView: UICollectionView! { + didSet { + collectionView.registerNib(type: CollectionViewCell.self) + collectionView.registerNib(type: CollectionReusableView.self, forSupplementaryViewOf: UICollectionElementKindSectionHeader) + } + } + + func inject(_ dependency: [(header: String, items: [String])]) { + dataSource = dependency + collectionView.reloadData() + } +} + +extension ViewController4: UICollectionViewDelegateFlowLayout, UICollectionViewDataSource { + func numberOfSections(in collectionView: UICollectionView) -> Int { + return dataSource.count + } + + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return dataSource[section].items.count + } + + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { + return CGSize(width: 100.0, height: 100.0) + } + + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize { + return CGSize(width: collectionView.frame.width, height: 50.0) + } + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + return CollectionViewCell.dequeue(from: collectionView, for: indexPath, with: dataSource[indexPath.section].items[indexPath.item]) + } + + func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView { + return CollectionReusableView.dequeue(from: collectionView, of: kind, for: indexPath, with: dataSource[indexPath.section].header) + } +} + +class NibViewController: UIViewController, NibInstantiatable { + + @IBOutlet var label: UILabel! + + func inject(_ dependency: String) { + label.text = dependency + } +} + +#endif diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/SubclassView.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/SubclassView.xib new file mode 100644 index 0000000..069acd2 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/SubclassView.xib @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/TableViewCell.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/TableViewCell.xib new file mode 100644 index 0000000..5cda134 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/TableViewCell.xib @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/TableViewHeader.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/TableViewHeader.xib new file mode 100644 index 0000000..41e3dd6 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/TableViewHeader.xib @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/View.xib b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/View.xib new file mode 100644 index 0000000..4285a64 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/View.xib @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/ViewController.storyboard b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/ViewController.storyboard new file mode 100644 index 0000000..4d11036 --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/InstantiateTests/tvOS/ViewController.storyboard @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Carthage/Checkouts/Instantiate/Tests/LinuxMain.swift b/Carthage/Checkouts/Instantiate/Tests/LinuxMain.swift new file mode 100644 index 0000000..e1e623f --- /dev/null +++ b/Carthage/Checkouts/Instantiate/Tests/LinuxMain.swift @@ -0,0 +1,6 @@ +import XCTest +@testable import InstantiateTests + +XCTMain([ + testCase(InstantiateTests.allTests), +]) diff --git a/sampleAppStore.xcodeproj/project.pbxproj b/sampleAppStore.xcodeproj/project.pbxproj index ceb94b5..2e59209 100644 --- a/sampleAppStore.xcodeproj/project.pbxproj +++ b/sampleAppStore.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 82655120227FC6A300E5623F /* Instantiate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8265511F227FC6A300E5623F /* Instantiate.framework */; }; + 82655122227FC6C800E5623F /* InstantiateStandard.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 82655121227FC6C800E5623F /* InstantiateStandard.framework */; }; 82678DEB227DA347003D19F8 /* SearchResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82678DEA227DA347003D19F8 /* SearchResult.swift */; }; 82678DEE227DA6E6003D19F8 /* Service.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82678DED227DA6E6003D19F8 /* Service.swift */; }; 82678DF1227DCDE7003D19F8 /* SDWebImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 82678DF0227DCDE7003D19F8 /* SDWebImage.framework */; }; @@ -51,6 +53,8 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 8265511F227FC6A300E5623F /* Instantiate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Instantiate.framework; path = Carthage/Build/iOS/Instantiate.framework; sourceTree = ""; }; + 82655121227FC6C800E5623F /* InstantiateStandard.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = InstantiateStandard.framework; path = Carthage/Build/iOS/InstantiateStandard.framework; sourceTree = ""; }; 82678DEA227DA347003D19F8 /* SearchResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchResult.swift; sourceTree = ""; }; 82678DED227DA6E6003D19F8 /* Service.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Service.swift; sourceTree = ""; }; 82678DF0227DCDE7003D19F8 /* SDWebImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDWebImage.framework; path = Carthage/Build/iOS/SDWebImage.framework; sourceTree = ""; }; @@ -101,6 +105,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 82655122227FC6C800E5623F /* InstantiateStandard.framework in Frameworks */, + 82655120227FC6A300E5623F /* Instantiate.framework in Frameworks */, 82678DF1227DCDE7003D19F8 /* SDWebImage.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -120,6 +126,8 @@ 82678DEF227DCDE6003D19F8 /* Frameworks */ = { isa = PBXGroup; children = ( + 82655121227FC6C800E5623F /* InstantiateStandard.framework */, + 8265511F227FC6A300E5623F /* Instantiate.framework */, 82678DF0227DCDE7003D19F8 /* SDWebImage.framework */, ); name = Frameworks; @@ -394,6 +402,8 @@ ); inputPaths = ( "$(SRCROOT)/Carthage/Build/iOS/SDWebImage.framework", + "$(SRCROOT)/Carthage/Build/iOS/Instantiate.framework", + "$(SRCROOT)/Carthage/Build/iOS/InstantiateStandard.framework", ); outputFileListPaths = ( ); diff --git a/sampleAppStore/View/Today/Cell/TodayCell.swift b/sampleAppStore/View/Today/Cell/TodayCell.swift index 1b120b4..6d23a21 100644 --- a/sampleAppStore/View/Today/Cell/TodayCell.swift +++ b/sampleAppStore/View/Today/Cell/TodayCell.swift @@ -7,6 +7,8 @@ // import UIKit +import Instantiate +import InstantiateStandard class TodayCell: UICollectionViewCell {