├── .gitignore
├── .slather.yml
├── .travis.yml
├── Examples
├── .gitignore
├── FrameAccessor-OSX
│ ├── FrameAccessor-OSX-Info.plist
│ ├── FrameAccessor-OSX-Prefix.pch
│ ├── FrameAccessor_OSX.h
│ ├── FrameAccessor_OSX.m
│ └── en.lproj
│ │ └── InfoPlist.strings
├── FrameAccessor-iOS
│ ├── FrameAccessor-iOS-Info.plist
│ ├── FrameAccessor-iOS-Prefix.pch
│ ├── FrameAccessor_iOS.h
│ ├── FrameAccessor_iOS.m
│ └── en.lproj
│ │ └── InfoPlist.strings
├── FrameAccessor.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── FrameAccessor.xcscheme
├── FrameAccessor.xcworkspace
│ └── contents.xcworkspacedata
├── FrameAccessor
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── FrameAccessor-Info.plist
│ ├── FrameAccessor-Prefix.pch
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── en.lproj
│ │ ├── InfoPlist.strings
│ │ └── ViewController.xib
│ └── main.m
├── FrameAccessorTests
│ ├── FrameAccessorTests.m
│ └── Info.plist
├── Gemfile
├── Gemfile.lock
├── Podfile
└── Podfile.lock
├── FrameAccessor.podspec
├── FrameAccessor
├── FrameAccessor.h
├── ScrollViewFrameAccessor.h
├── ScrollViewFrameAccessor.m
├── ViewFrameAccessor.h
└── ViewFrameAccessor.m
├── LICENSE
├── README.md
└── screenshot.png
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 |
--------------------------------------------------------------------------------
/.slather.yml:
--------------------------------------------------------------------------------
1 | ci_service: travis_ci
2 | coverage_service: coveralls
3 | xcodeproj: Examples/FrameAccessor.xcodeproj
4 | source_directory: FrameAccessor
5 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: objective-c
2 | podfile: Examples/Podfile
3 |
4 | before_install:
5 | - gem install activesupport -N
6 | - gem install slather --no-rdoc
7 | - gem i cocoapods --no-ri --no-rdoc
8 | - gem i xcpretty --no-ri --no-rdoc
9 |
10 | xcode_workspace: Examples/FrameAccessor.xcworkspace
11 | xcode_scheme: FrameAccessor
12 | xcode_sdk: iphonesimulator
13 |
14 | after_success: slather
15 |
--------------------------------------------------------------------------------
/Examples/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | .DS_Store
3 | */build/*
4 | *.pbxuser
5 | !default.pbxuser
6 | *.mode1v3
7 | !default.mode1v3
8 | *.mode2v3
9 | !default.mode2v3
10 | *.perspectivev3
11 | !default.perspectivev3
12 | xcuserdata
13 | profile
14 | *.moved-aside
15 | DerivedData
16 | .idea/
17 | *.hmap
18 | *.xccheckout
19 |
20 | #CocoaPods
21 | Pods
22 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor-OSX/FrameAccessor-OSX-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | org.okolodev.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | FMWK
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | NSHumanReadableCopyright
26 | Copyright © 2014 Artox Lab. All rights reserved.
27 | NSPrincipalClass
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor-OSX/FrameAccessor-OSX-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #ifdef __OBJC__
8 | #import
9 | #endif
10 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor-OSX/FrameAccessor_OSX.h:
--------------------------------------------------------------------------------
1 | //
2 | // FrameAccessor_OSX.h
3 | // FrameAccessor-OSX
4 | //
5 | // Created by AlexDenisov on 6/10/14.
6 | // Copyright (c) 2014 Artox Lab. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FrameAccessor_OSX : NSObject
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor-OSX/FrameAccessor_OSX.m:
--------------------------------------------------------------------------------
1 | //
2 | // FrameAccessor_OSX.m
3 | // FrameAccessor-OSX
4 | //
5 | // Created by AlexDenisov on 6/10/14.
6 | // Copyright (c) 2014 Artox Lab. All rights reserved.
7 | //
8 |
9 | #import "FrameAccessor_OSX.h"
10 |
11 | @implementation FrameAccessor_OSX
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor-OSX/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor-iOS/FrameAccessor-iOS-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | org.okolodev.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | FMWK
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | NSPrincipalClass
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor-iOS/FrameAccessor-iOS-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #ifdef __OBJC__
8 | #import
9 | #endif
10 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor-iOS/FrameAccessor_iOS.h:
--------------------------------------------------------------------------------
1 | //
2 | // FrameAccessor_iOS.h
3 | // FrameAccessor-iOS
4 | //
5 | // Created by AlexDenisov on 6/10/14.
6 | // Copyright (c) 2014 Artox Lab. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FrameAccessor_iOS : NSObject
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor-iOS/FrameAccessor_iOS.m:
--------------------------------------------------------------------------------
1 | //
2 | // FrameAccessor_iOS.m
3 | // FrameAccessor-iOS
4 | //
5 | // Created by AlexDenisov on 6/10/14.
6 | // Copyright (c) 2014 Artox Lab. All rights reserved.
7 | //
8 |
9 | #import "FrameAccessor_iOS.h"
10 |
11 | @implementation FrameAccessor_iOS
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor-iOS/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 198C9BF8181F92E70021C1C7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 198C9BF7181F92E70021C1C7 /* UIKit.framework */; };
11 | 198C9BFA181F92E70021C1C7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 198C9BF9181F92E70021C1C7 /* Foundation.framework */; };
12 | 198C9BFC181F92E70021C1C7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 198C9BFB181F92E70021C1C7 /* CoreGraphics.framework */; };
13 | 198C9C02181F92E70021C1C7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 198C9C00181F92E70021C1C7 /* InfoPlist.strings */; };
14 | 198C9C04181F92E70021C1C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 198C9C03181F92E70021C1C7 /* main.m */; };
15 | 198C9C08181F92E70021C1C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 198C9C07181F92E70021C1C7 /* AppDelegate.m */; };
16 | 198C9C11181F92E70021C1C7 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 198C9C10181F92E70021C1C7 /* ViewController.m */; };
17 | 198C9C14181F92E70021C1C7 /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 198C9C12181F92E70021C1C7 /* ViewController.xib */; };
18 | 198C9C20181F932C0021C1C7 /* ScrollViewFrameAccessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 198C9C1D181F932C0021C1C7 /* ScrollViewFrameAccessor.m */; };
19 | 198C9C21181F932C0021C1C7 /* ViewFrameAccessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 198C9C1F181F932C0021C1C7 /* ViewFrameAccessor.m */; };
20 | 46D365D019471C90005B8F7D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 46D365CE19471C90005B8F7D /* InfoPlist.strings */; };
21 | 46D365D819471D34005B8F7D /* ViewFrameAccessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 198C9C1F181F932C0021C1C7 /* ViewFrameAccessor.m */; };
22 | 46D365DA19471D41005B8F7D /* FrameAccessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 198C9C1B181F932C0021C1C7 /* FrameAccessor.h */; settings = {ATTRIBUTES = (Public, ); }; };
23 | 46D365DB19471D41005B8F7D /* ViewFrameAccessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 198C9C1E181F932C0021C1C7 /* ViewFrameAccessor.h */; settings = {ATTRIBUTES = (Public, ); }; };
24 | 46D365E419471DF3005B8F7D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 46D365E319471DF3005B8F7D /* Cocoa.framework */; };
25 | 46D365EE19471DF3005B8F7D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 46D365EC19471DF3005B8F7D /* InfoPlist.strings */; };
26 | 46D3660C19471E0B005B8F7D /* ViewFrameAccessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 198C9C1F181F932C0021C1C7 /* ViewFrameAccessor.m */; };
27 | 46D3660E19471E17005B8F7D /* FrameAccessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 198C9C1B181F932C0021C1C7 /* FrameAccessor.h */; settings = {ATTRIBUTES = (Public, ); }; };
28 | 46D3660F19471E17005B8F7D /* ViewFrameAccessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 198C9C1E181F932C0021C1C7 /* ViewFrameAccessor.h */; settings = {ATTRIBUTES = (Public, ); }; };
29 | 46D3661919472295005B8F7D /* ScrollViewFrameAccessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 198C9C1D181F932C0021C1C7 /* ScrollViewFrameAccessor.m */; };
30 | 46D3661A194722A3005B8F7D /* ScrollViewFrameAccessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 198C9C1C181F932C0021C1C7 /* ScrollViewFrameAccessor.h */; settings = {ATTRIBUTES = (Public, ); }; };
31 | E00437251AE3178B00C616DB /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E00437241AE3178B00C616DB /* Images.xcassets */; };
32 | E0D90D851AE2EC8500266F3F /* FrameAccessorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E0D90D841AE2EC8500266F3F /* FrameAccessorTests.m */; };
33 | F75A53CE6007E0B93A9F67C7 /* libPods-FrameAccessor.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4672FB4025732642E318AD2B /* libPods-FrameAccessor.a */; };
34 | /* End PBXBuildFile section */
35 |
36 | /* Begin PBXContainerItemProxy section */
37 | E0D90D861AE2EC8500266F3F /* PBXContainerItemProxy */ = {
38 | isa = PBXContainerItemProxy;
39 | containerPortal = 198C9BEC181F92E70021C1C7 /* Project object */;
40 | proxyType = 1;
41 | remoteGlobalIDString = 198C9BF3181F92E70021C1C7;
42 | remoteInfo = FrameAccessor;
43 | };
44 | /* End PBXContainerItemProxy section */
45 |
46 | /* Begin PBXFileReference section */
47 | 198C9BF4181F92E70021C1C7 /* FrameAccessor.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FrameAccessor.app; sourceTree = BUILT_PRODUCTS_DIR; };
48 | 198C9BF7181F92E70021C1C7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
49 | 198C9BF9181F92E70021C1C7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
50 | 198C9BFB181F92E70021C1C7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
51 | 198C9BFF181F92E70021C1C7 /* FrameAccessor-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "FrameAccessor-Info.plist"; sourceTree = ""; };
52 | 198C9C01181F92E70021C1C7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
53 | 198C9C03181F92E70021C1C7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
54 | 198C9C05181F92E70021C1C7 /* FrameAccessor-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FrameAccessor-Prefix.pch"; sourceTree = ""; };
55 | 198C9C06181F92E70021C1C7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
56 | 198C9C07181F92E70021C1C7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
57 | 198C9C0F181F92E70021C1C7 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
58 | 198C9C10181F92E70021C1C7 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
59 | 198C9C13181F92E70021C1C7 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController.xib; sourceTree = ""; };
60 | 198C9C1B181F932C0021C1C7 /* FrameAccessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FrameAccessor.h; sourceTree = ""; };
61 | 198C9C1C181F932C0021C1C7 /* ScrollViewFrameAccessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollViewFrameAccessor.h; sourceTree = ""; };
62 | 198C9C1D181F932C0021C1C7 /* ScrollViewFrameAccessor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScrollViewFrameAccessor.m; sourceTree = ""; };
63 | 198C9C1E181F932C0021C1C7 /* ViewFrameAccessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewFrameAccessor.h; sourceTree = ""; };
64 | 198C9C1F181F932C0021C1C7 /* ViewFrameAccessor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewFrameAccessor.m; sourceTree = ""; };
65 | 4672FB4025732642E318AD2B /* libPods-FrameAccessor.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-FrameAccessor.a"; sourceTree = BUILT_PRODUCTS_DIR; };
66 | 46D365CA19471C90005B8F7D /* FrameAccessor.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FrameAccessor.framework; sourceTree = BUILT_PRODUCTS_DIR; };
67 | 46D365CD19471C90005B8F7D /* FrameAccessor-iOS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "FrameAccessor-iOS-Info.plist"; sourceTree = ""; };
68 | 46D365CF19471C90005B8F7D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
69 | 46D365D119471C90005B8F7D /* FrameAccessor-iOS-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FrameAccessor-iOS-Prefix.pch"; sourceTree = ""; };
70 | 46D365D219471C90005B8F7D /* FrameAccessor_iOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FrameAccessor_iOS.h; sourceTree = ""; };
71 | 46D365D319471C90005B8F7D /* FrameAccessor_iOS.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FrameAccessor_iOS.m; sourceTree = ""; };
72 | 46D365E219471DF3005B8F7D /* FrameAccessor.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FrameAccessor.framework; sourceTree = BUILT_PRODUCTS_DIR; };
73 | 46D365E319471DF3005B8F7D /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; };
74 | 46D365E619471DF3005B8F7D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
75 | 46D365E719471DF3005B8F7D /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
76 | 46D365E819471DF3005B8F7D /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
77 | 46D365EB19471DF3005B8F7D /* FrameAccessor-OSX-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "FrameAccessor-OSX-Info.plist"; sourceTree = ""; };
78 | 46D365ED19471DF3005B8F7D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
79 | 46D365EF19471DF3005B8F7D /* FrameAccessor-OSX-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FrameAccessor-OSX-Prefix.pch"; sourceTree = ""; };
80 | 46D365F019471DF3005B8F7D /* FrameAccessor_OSX.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FrameAccessor_OSX.h; sourceTree = ""; };
81 | 46D365F119471DF3005B8F7D /* FrameAccessor_OSX.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FrameAccessor_OSX.m; sourceTree = ""; };
82 | 46D365F819471DF3005B8F7D /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
83 | 478D0DB65C02FB20F28C121A /* Pods-FrameAccessor.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FrameAccessor.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FrameAccessor/Pods-FrameAccessor.debug.xcconfig"; sourceTree = ""; };
84 | E00437241AE3178B00C616DB /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
85 | E0A2062C6B33159386456968 /* Pods-FrameAccessor.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FrameAccessor.release.xcconfig"; path = "Pods/Target Support Files/Pods-FrameAccessor/Pods-FrameAccessor.release.xcconfig"; sourceTree = ""; };
86 | E0D90D801AE2EC8500266F3F /* FrameAccessorTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FrameAccessorTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
87 | E0D90D831AE2EC8500266F3F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
88 | E0D90D841AE2EC8500266F3F /* FrameAccessorTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FrameAccessorTests.m; sourceTree = ""; };
89 | /* End PBXFileReference section */
90 |
91 | /* Begin PBXFrameworksBuildPhase section */
92 | 198C9BF1181F92E70021C1C7 /* Frameworks */ = {
93 | isa = PBXFrameworksBuildPhase;
94 | buildActionMask = 2147483647;
95 | files = (
96 | 198C9BF8181F92E70021C1C7 /* UIKit.framework in Frameworks */,
97 | 198C9BFA181F92E70021C1C7 /* Foundation.framework in Frameworks */,
98 | 198C9BFC181F92E70021C1C7 /* CoreGraphics.framework in Frameworks */,
99 | F75A53CE6007E0B93A9F67C7 /* libPods-FrameAccessor.a in Frameworks */,
100 | );
101 | runOnlyForDeploymentPostprocessing = 0;
102 | };
103 | 46D365C519471C90005B8F7D /* Frameworks */ = {
104 | isa = PBXFrameworksBuildPhase;
105 | buildActionMask = 2147483647;
106 | files = (
107 | );
108 | runOnlyForDeploymentPostprocessing = 0;
109 | };
110 | 46D365DE19471DF3005B8F7D /* Frameworks */ = {
111 | isa = PBXFrameworksBuildPhase;
112 | buildActionMask = 2147483647;
113 | files = (
114 | 46D365E419471DF3005B8F7D /* Cocoa.framework in Frameworks */,
115 | );
116 | runOnlyForDeploymentPostprocessing = 0;
117 | };
118 | E0D90D7D1AE2EC8500266F3F /* Frameworks */ = {
119 | isa = PBXFrameworksBuildPhase;
120 | buildActionMask = 2147483647;
121 | files = (
122 | );
123 | runOnlyForDeploymentPostprocessing = 0;
124 | };
125 | /* End PBXFrameworksBuildPhase section */
126 |
127 | /* Begin PBXGroup section */
128 | 198C9BEB181F92E70021C1C7 = {
129 | isa = PBXGroup;
130 | children = (
131 | 198C9BFD181F92E70021C1C7 /* FrameAccessor */,
132 | 46D365CB19471C90005B8F7D /* FrameAccessor-iOS */,
133 | 46D365E919471DF3005B8F7D /* FrameAccessor-OSX */,
134 | E0D90D811AE2EC8500266F3F /* FrameAccessorTests */,
135 | 198C9BF6181F92E70021C1C7 /* Frameworks */,
136 | 198C9BF5181F92E70021C1C7 /* Products */,
137 | C67F67C0707DF6C6531E0A5B /* Pods */,
138 | );
139 | sourceTree = "";
140 | };
141 | 198C9BF5181F92E70021C1C7 /* Products */ = {
142 | isa = PBXGroup;
143 | children = (
144 | 198C9BF4181F92E70021C1C7 /* FrameAccessor.app */,
145 | 46D365CA19471C90005B8F7D /* FrameAccessor.framework */,
146 | 46D365E219471DF3005B8F7D /* FrameAccessor.framework */,
147 | E0D90D801AE2EC8500266F3F /* FrameAccessorTests.xctest */,
148 | );
149 | name = Products;
150 | sourceTree = "";
151 | };
152 | 198C9BF6181F92E70021C1C7 /* Frameworks */ = {
153 | isa = PBXGroup;
154 | children = (
155 | 198C9C1A181F932C0021C1C7 /* FrameAccessor */,
156 | 198C9BF7181F92E70021C1C7 /* UIKit.framework */,
157 | 198C9BF9181F92E70021C1C7 /* Foundation.framework */,
158 | 198C9BFB181F92E70021C1C7 /* CoreGraphics.framework */,
159 | 46D365E319471DF3005B8F7D /* Cocoa.framework */,
160 | 46D365F819471DF3005B8F7D /* XCTest.framework */,
161 | 46D365E519471DF3005B8F7D /* Other Frameworks */,
162 | 4672FB4025732642E318AD2B /* libPods-FrameAccessor.a */,
163 | );
164 | name = Frameworks;
165 | sourceTree = "";
166 | };
167 | 198C9BFD181F92E70021C1C7 /* FrameAccessor */ = {
168 | isa = PBXGroup;
169 | children = (
170 | 198C9C06181F92E70021C1C7 /* AppDelegate.h */,
171 | 198C9C07181F92E70021C1C7 /* AppDelegate.m */,
172 | 198C9C0F181F92E70021C1C7 /* ViewController.h */,
173 | 198C9C10181F92E70021C1C7 /* ViewController.m */,
174 | 198C9C12181F92E70021C1C7 /* ViewController.xib */,
175 | E00437241AE3178B00C616DB /* Images.xcassets */,
176 | 198C9BFE181F92E70021C1C7 /* Supporting Files */,
177 | );
178 | path = FrameAccessor;
179 | sourceTree = "";
180 | };
181 | 198C9BFE181F92E70021C1C7 /* Supporting Files */ = {
182 | isa = PBXGroup;
183 | children = (
184 | 198C9BFF181F92E70021C1C7 /* FrameAccessor-Info.plist */,
185 | 198C9C00181F92E70021C1C7 /* InfoPlist.strings */,
186 | 198C9C03181F92E70021C1C7 /* main.m */,
187 | 198C9C05181F92E70021C1C7 /* FrameAccessor-Prefix.pch */,
188 | );
189 | name = "Supporting Files";
190 | sourceTree = "";
191 | };
192 | 198C9C1A181F932C0021C1C7 /* FrameAccessor */ = {
193 | isa = PBXGroup;
194 | children = (
195 | 198C9C1B181F932C0021C1C7 /* FrameAccessor.h */,
196 | 198C9C1E181F932C0021C1C7 /* ViewFrameAccessor.h */,
197 | 198C9C1F181F932C0021C1C7 /* ViewFrameAccessor.m */,
198 | 198C9C1C181F932C0021C1C7 /* ScrollViewFrameAccessor.h */,
199 | 198C9C1D181F932C0021C1C7 /* ScrollViewFrameAccessor.m */,
200 | );
201 | name = FrameAccessor;
202 | path = ../FrameAccessor;
203 | sourceTree = "";
204 | };
205 | 46D365CB19471C90005B8F7D /* FrameAccessor-iOS */ = {
206 | isa = PBXGroup;
207 | children = (
208 | 46D365D219471C90005B8F7D /* FrameAccessor_iOS.h */,
209 | 46D365D319471C90005B8F7D /* FrameAccessor_iOS.m */,
210 | 46D365CC19471C90005B8F7D /* Supporting Files */,
211 | );
212 | path = "FrameAccessor-iOS";
213 | sourceTree = "";
214 | };
215 | 46D365CC19471C90005B8F7D /* Supporting Files */ = {
216 | isa = PBXGroup;
217 | children = (
218 | 46D365CD19471C90005B8F7D /* FrameAccessor-iOS-Info.plist */,
219 | 46D365CE19471C90005B8F7D /* InfoPlist.strings */,
220 | 46D365D119471C90005B8F7D /* FrameAccessor-iOS-Prefix.pch */,
221 | );
222 | name = "Supporting Files";
223 | sourceTree = "";
224 | };
225 | 46D365E519471DF3005B8F7D /* Other Frameworks */ = {
226 | isa = PBXGroup;
227 | children = (
228 | 46D365E619471DF3005B8F7D /* Foundation.framework */,
229 | 46D365E719471DF3005B8F7D /* CoreData.framework */,
230 | 46D365E819471DF3005B8F7D /* AppKit.framework */,
231 | );
232 | name = "Other Frameworks";
233 | sourceTree = "";
234 | };
235 | 46D365E919471DF3005B8F7D /* FrameAccessor-OSX */ = {
236 | isa = PBXGroup;
237 | children = (
238 | 46D365F019471DF3005B8F7D /* FrameAccessor_OSX.h */,
239 | 46D365F119471DF3005B8F7D /* FrameAccessor_OSX.m */,
240 | 46D365EA19471DF3005B8F7D /* Supporting Files */,
241 | );
242 | path = "FrameAccessor-OSX";
243 | sourceTree = "";
244 | };
245 | 46D365EA19471DF3005B8F7D /* Supporting Files */ = {
246 | isa = PBXGroup;
247 | children = (
248 | 46D365EB19471DF3005B8F7D /* FrameAccessor-OSX-Info.plist */,
249 | 46D365EC19471DF3005B8F7D /* InfoPlist.strings */,
250 | 46D365EF19471DF3005B8F7D /* FrameAccessor-OSX-Prefix.pch */,
251 | );
252 | name = "Supporting Files";
253 | sourceTree = "";
254 | };
255 | C67F67C0707DF6C6531E0A5B /* Pods */ = {
256 | isa = PBXGroup;
257 | children = (
258 | 478D0DB65C02FB20F28C121A /* Pods-FrameAccessor.debug.xcconfig */,
259 | E0A2062C6B33159386456968 /* Pods-FrameAccessor.release.xcconfig */,
260 | );
261 | name = Pods;
262 | sourceTree = "";
263 | };
264 | E0D90D811AE2EC8500266F3F /* FrameAccessorTests */ = {
265 | isa = PBXGroup;
266 | children = (
267 | E0D90D841AE2EC8500266F3F /* FrameAccessorTests.m */,
268 | E0D90D821AE2EC8500266F3F /* Supporting Files */,
269 | );
270 | path = FrameAccessorTests;
271 | sourceTree = "";
272 | };
273 | E0D90D821AE2EC8500266F3F /* Supporting Files */ = {
274 | isa = PBXGroup;
275 | children = (
276 | E0D90D831AE2EC8500266F3F /* Info.plist */,
277 | );
278 | name = "Supporting Files";
279 | sourceTree = "";
280 | };
281 | /* End PBXGroup section */
282 |
283 | /* Begin PBXHeadersBuildPhase section */
284 | 46D365C619471C90005B8F7D /* Headers */ = {
285 | isa = PBXHeadersBuildPhase;
286 | buildActionMask = 2147483647;
287 | files = (
288 | 46D365DA19471D41005B8F7D /* FrameAccessor.h in Headers */,
289 | 46D365DB19471D41005B8F7D /* ViewFrameAccessor.h in Headers */,
290 | 46D3661A194722A3005B8F7D /* ScrollViewFrameAccessor.h in Headers */,
291 | );
292 | runOnlyForDeploymentPostprocessing = 0;
293 | };
294 | 46D365DF19471DF3005B8F7D /* Headers */ = {
295 | isa = PBXHeadersBuildPhase;
296 | buildActionMask = 2147483647;
297 | files = (
298 | 46D3660E19471E17005B8F7D /* FrameAccessor.h in Headers */,
299 | 46D3660F19471E17005B8F7D /* ViewFrameAccessor.h in Headers */,
300 | );
301 | runOnlyForDeploymentPostprocessing = 0;
302 | };
303 | /* End PBXHeadersBuildPhase section */
304 |
305 | /* Begin PBXNativeTarget section */
306 | 198C9BF3181F92E70021C1C7 /* FrameAccessor */ = {
307 | isa = PBXNativeTarget;
308 | buildConfigurationList = 198C9C17181F92E70021C1C7 /* Build configuration list for PBXNativeTarget "FrameAccessor" */;
309 | buildPhases = (
310 | 4257798729631E3F699B04D3 /* Check Pods Manifest.lock */,
311 | 198C9BF0181F92E70021C1C7 /* Sources */,
312 | 198C9BF1181F92E70021C1C7 /* Frameworks */,
313 | 198C9BF2181F92E70021C1C7 /* Resources */,
314 | D42800E89B7CB74D0CA460F9 /* Copy Pods Resources */,
315 | );
316 | buildRules = (
317 | );
318 | dependencies = (
319 | );
320 | name = FrameAccessor;
321 | productName = FrameAccessor;
322 | productReference = 198C9BF4181F92E70021C1C7 /* FrameAccessor.app */;
323 | productType = "com.apple.product-type.application";
324 | };
325 | 46D365C919471C90005B8F7D /* FrameAccessor-iOS */ = {
326 | isa = PBXNativeTarget;
327 | buildConfigurationList = 46D365D719471C90005B8F7D /* Build configuration list for PBXNativeTarget "FrameAccessor-iOS" */;
328 | buildPhases = (
329 | 46D365C419471C90005B8F7D /* Sources */,
330 | 46D365C519471C90005B8F7D /* Frameworks */,
331 | 46D365C619471C90005B8F7D /* Headers */,
332 | 46D365C719471C90005B8F7D /* Resources */,
333 | 46D365C819471C90005B8F7D /* ShellScript */,
334 | );
335 | buildRules = (
336 | );
337 | dependencies = (
338 | );
339 | name = "FrameAccessor-iOS";
340 | productName = "FrameAccessor-iOS";
341 | productReference = 46D365CA19471C90005B8F7D /* FrameAccessor.framework */;
342 | productType = "com.apple.product-type.bundle";
343 | };
344 | 46D365E119471DF3005B8F7D /* FrameAccessor-OSX */ = {
345 | isa = PBXNativeTarget;
346 | buildConfigurationList = 46D3660619471DF3005B8F7D /* Build configuration list for PBXNativeTarget "FrameAccessor-OSX" */;
347 | buildPhases = (
348 | 46D365DD19471DF3005B8F7D /* Sources */,
349 | 46D365DE19471DF3005B8F7D /* Frameworks */,
350 | 46D365DF19471DF3005B8F7D /* Headers */,
351 | 46D365E019471DF3005B8F7D /* Resources */,
352 | );
353 | buildRules = (
354 | );
355 | dependencies = (
356 | );
357 | name = "FrameAccessor-OSX";
358 | productName = "FrameAccessor-OSX";
359 | productReference = 46D365E219471DF3005B8F7D /* FrameAccessor.framework */;
360 | productType = "com.apple.product-type.framework";
361 | };
362 | E0D90D7F1AE2EC8500266F3F /* FrameAccessorTests */ = {
363 | isa = PBXNativeTarget;
364 | buildConfigurationList = E0D90D8A1AE2EC8500266F3F /* Build configuration list for PBXNativeTarget "FrameAccessorTests" */;
365 | buildPhases = (
366 | E0D90D7C1AE2EC8500266F3F /* Sources */,
367 | E0D90D7D1AE2EC8500266F3F /* Frameworks */,
368 | E0D90D7E1AE2EC8500266F3F /* Resources */,
369 | );
370 | buildRules = (
371 | );
372 | dependencies = (
373 | E0D90D871AE2EC8500266F3F /* PBXTargetDependency */,
374 | );
375 | name = FrameAccessorTests;
376 | productName = FrameAccessorTests;
377 | productReference = E0D90D801AE2EC8500266F3F /* FrameAccessorTests.xctest */;
378 | productType = "com.apple.product-type.bundle.unit-test";
379 | };
380 | /* End PBXNativeTarget section */
381 |
382 | /* Begin PBXProject section */
383 | 198C9BEC181F92E70021C1C7 /* Project object */ = {
384 | isa = PBXProject;
385 | attributes = {
386 | LastUpgradeCheck = 0460;
387 | ORGANIZATIONNAME = "Artox Lab";
388 | TargetAttributes = {
389 | E0D90D7F1AE2EC8500266F3F = {
390 | CreatedOnToolsVersion = 6.3;
391 | TestTargetID = 198C9BF3181F92E70021C1C7;
392 | };
393 | };
394 | };
395 | buildConfigurationList = 198C9BEF181F92E70021C1C7 /* Build configuration list for PBXProject "FrameAccessor" */;
396 | compatibilityVersion = "Xcode 3.2";
397 | developmentRegion = English;
398 | hasScannedForEncodings = 0;
399 | knownRegions = (
400 | en,
401 | );
402 | mainGroup = 198C9BEB181F92E70021C1C7;
403 | productRefGroup = 198C9BF5181F92E70021C1C7 /* Products */;
404 | projectDirPath = "";
405 | projectRoot = "";
406 | targets = (
407 | 198C9BF3181F92E70021C1C7 /* FrameAccessor */,
408 | 46D365C919471C90005B8F7D /* FrameAccessor-iOS */,
409 | E0D90D7F1AE2EC8500266F3F /* FrameAccessorTests */,
410 | 46D365E119471DF3005B8F7D /* FrameAccessor-OSX */,
411 | );
412 | };
413 | /* End PBXProject section */
414 |
415 | /* Begin PBXResourcesBuildPhase section */
416 | 198C9BF2181F92E70021C1C7 /* Resources */ = {
417 | isa = PBXResourcesBuildPhase;
418 | buildActionMask = 2147483647;
419 | files = (
420 | E00437251AE3178B00C616DB /* Images.xcassets in Resources */,
421 | 198C9C02181F92E70021C1C7 /* InfoPlist.strings in Resources */,
422 | 198C9C14181F92E70021C1C7 /* ViewController.xib in Resources */,
423 | );
424 | runOnlyForDeploymentPostprocessing = 0;
425 | };
426 | 46D365C719471C90005B8F7D /* Resources */ = {
427 | isa = PBXResourcesBuildPhase;
428 | buildActionMask = 2147483647;
429 | files = (
430 | 46D365D019471C90005B8F7D /* InfoPlist.strings in Resources */,
431 | );
432 | runOnlyForDeploymentPostprocessing = 0;
433 | };
434 | 46D365E019471DF3005B8F7D /* Resources */ = {
435 | isa = PBXResourcesBuildPhase;
436 | buildActionMask = 2147483647;
437 | files = (
438 | 46D365EE19471DF3005B8F7D /* InfoPlist.strings in Resources */,
439 | );
440 | runOnlyForDeploymentPostprocessing = 0;
441 | };
442 | E0D90D7E1AE2EC8500266F3F /* Resources */ = {
443 | isa = PBXResourcesBuildPhase;
444 | buildActionMask = 2147483647;
445 | files = (
446 | );
447 | runOnlyForDeploymentPostprocessing = 0;
448 | };
449 | /* End PBXResourcesBuildPhase section */
450 |
451 | /* Begin PBXShellScriptBuildPhase section */
452 | 4257798729631E3F699B04D3 /* Check Pods Manifest.lock */ = {
453 | isa = PBXShellScriptBuildPhase;
454 | buildActionMask = 2147483647;
455 | files = (
456 | );
457 | inputPaths = (
458 | );
459 | name = "Check Pods Manifest.lock";
460 | outputPaths = (
461 | );
462 | runOnlyForDeploymentPostprocessing = 0;
463 | shellPath = /bin/sh;
464 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
465 | showEnvVarsInLog = 0;
466 | };
467 | 46D365C819471C90005B8F7D /* ShellScript */ = {
468 | isa = PBXShellScriptBuildPhase;
469 | buildActionMask = 2147483647;
470 | files = (
471 | );
472 | inputPaths = (
473 | );
474 | outputPaths = (
475 | );
476 | runOnlyForDeploymentPostprocessing = 0;
477 | shellPath = /usr/bin/python;
478 | shellScript = "# TAG: BUILD SCRIPT (do not remove this comment)\n# Build script generated using https://github.com/kstenerud/iOS-Universal-Framework Mk 8 (beta 2012-06-16)\nimport logging\n\n\n##############################################################################\n#\n# Configuration\n#\n##############################################################################\n\n# Select which kind of framework to build.\n#\n# Note: Due to issues with Xcode's build process, if you select\n# 'embeddedframework', it will still show the regular framework\n# (as a symlink) along side of the embedded framework. Be sure to\n# instruct your users to copy/move the embedded framework in this case!\n#\n# If your framework contains resources such as images, nibs, momds, plists,\n# zipfiles and such, choose 'embeddedframework'.\n#\n# If your framework contains no resources, choose 'framework'.\n#\nconfig_framework_type = 'framework'\n#config_framework_type = 'embeddedframework'\n\n# Open the build directory in Finder when the universal framework is\n# successfully built.\n#\n# This value can be overridden by setting the UFW_OPEN_BUILD_DIR env variable\n# to True or False.\n#\n# Recommended setting: True\n#\nconfig_open_build_dir = True\n\n# If true, ensures that all public headers are stored in the framework under\n# the same directory hierarchy as they were in the source tree.\n#\n# Xcode by default places all headers at the same top level, but every other\n# build tool in the known universe preserves directory structure. For simple\n# libraries it doesn't really matter much, but for ports of existing software\n# packages or for bigger libraries, it makes sense to have more structure.\n#\n# The default is set to \"False\" since that's what most Xcode users are used to.\n#\n# Recommended setting: True for deep hierarchy projects, False otherwise.\n#\nconfig_deep_header_hierarchy = False\n\n# Specify where the top of the public header hierarchy is. This path is\n# relative to the project's dir (PROJECT_DIR). You can reference environment\n# variables using templating syntax (e.g. \"${TARGET_NAME}/Some/Subdir\")\n#\n# NOTE: Only used if config_deep_header_hierarchy is True.\n#\n# If this is set to None, the script will attempt to figure out for itself\n# where the top of the header hierarchy is by looking for common path prefixes\n# in the public header files. This process can fail if:\n# - You only have one public header file.\n# - Your source header files don't all have a common root.\n#\n# A common approach is to use \"${TARGET_NAME}\", working under the assumption\n# that all of your header files share the common root of a directory under\n# your project with the same name as your target (which is the Xcode default).\n#\n# Recommended setting: \"${TARGET_NAME}\"\n#\nconfig_deep_header_top = \"${TARGET_NAME}\"\n\n# Warn when \"DerivedData\" is detected in any of the header, library, or\n# framework search paths. In almost all cases, references to directories under\n# DerivedData are added as a result of an Xcode bug and must be manually\n# removed.\n#\n# Recommended setting: True\n#\nconfig_warn_derived_data = True\n\n# Warn if no headers were marked public in this framework.\n#\n# Recommended setting: True\n#\nconfig_warn_no_public_headers = True\n\n# Cause the build to fail if any warnings are issued.\n#\n# Recommended setting: True\n#\nconfig_fail_on_warnings = True\n\n# Minimum log level\n#\n# Recommended setting: logging.INFO\n#\nconfig_log_level = logging.INFO\n\n\n##############################################################################\n#\n# Don't touch anything below here unless you know what you're doing.\n#\n##############################################################################\n\nimport collections\nimport json\nimport os\nimport re\nimport shlex\nimport shutil\nimport string\nimport subprocess\nimport sys\nimport time\nimport traceback\n\n\n##############################################################################\n#\n# Globals\n#\n##############################################################################\n\nlog = logging.getLogger('UFW')\n\nissued_warnings = False\n\n\n##############################################################################\n#\n# Classes\n#\n##############################################################################\n\n# Allows the slave build to communicate with the master build.\n#\nclass BuildState:\n\n def __init__(self):\n self.reload()\n\n def reset(self):\n self.slave_platform = None\n self.slave_architectures = []\n self.slave_linked_archive_paths = []\n self.slave_built_fw_path = None\n self.slave_built_embedded_fw_path = None\n\n def set_slave_properties(self, architectures,\n linked_archive_paths,\n built_fw_path,\n built_embedded_fw_path):\n self.slave_platform = os.environ['PLATFORM_NAME']\n self.slave_architectures = architectures\n self.slave_linked_archive_paths = linked_archive_paths\n self.slave_built_fw_path = built_fw_path\n self.slave_built_embedded_fw_path = built_embedded_fw_path\n\n def get_save_path(self):\n return os.path.join(os.environ['PROJECT_TEMP_DIR'], \"ufw_build_state.json\")\n\n def persist(self):\n filename = self.get_save_path()\n parent = os.path.dirname(filename)\n if not os.path.isdir(parent):\n os.makedirs(parent)\n with open(filename, \"w\") as f:\n f.write(json.dumps(self.__dict__))\n\n def reload(self):\n self.reset()\n filename = self.get_save_path()\n if os.path.exists(filename):\n with open(filename, \"r\") as f:\n new_dict = json.loads(f.read())\n if new_dict is not None:\n self.__dict__ = dict(self.__dict__.items() + new_dict.items())\n\n\n# Holds information about the current project and build environment.\n#\nclass Project:\n\n def __init__(self, filename):\n sourcecode_types = ['sourcecode.c.c',\n 'sourcecode.c.objc',\n 'sourcecode.cpp.cpp',\n 'sourcecode.cpp.objcpp',\n 'sourcecode.asm.asm',\n 'sourcecode.asm.llvm',\n 'sourcecode.nasm']\n\n self.build_state = BuildState()\n self.project_data = self.load_from_file(filename)\n self.target = filter(lambda x: x['name'] == os.environ['TARGET_NAME'], self.project_data['targets'])[0]\n self.public_headers = self.get_build_phase_files('PBXHeadersBuildPhase', lambda x: x.get('settings', False) and x['settings'].get('ATTRIBUTES', False) and 'Public' in x['settings']['ATTRIBUTES'])\n self.static_libraries = self.get_build_phase_files('PBXFrameworksBuildPhase', lambda x: x['fileRef']['fileType'] == 'archive.ar' and x['fileRef']['sourceTree'] not in ['DEVELOPER_DIR', 'SDKROOT'])\n self.static_frameworks = self.get_build_phase_files('PBXFrameworksBuildPhase', lambda x: x['fileRef']['fileType'] == 'wrapper.framework' and x['fileRef']['sourceTree'] not in ['DEVELOPER_DIR', 'SDKROOT'])\n self.compilable_sources = self.get_build_phase_files('PBXSourcesBuildPhase', lambda x: x['fileRef']['fileType'] in sourcecode_types)\n self.header_paths = [os.path.join(*x['pathComponents']) for x in self.public_headers]\n\n self.headers_dir = os.path.join(os.environ['TARGET_BUILD_DIR'], os.environ['CONTENTS_FOLDER_PATH'], 'Headers')\n self.libtool_path = os.path.join(os.environ['DT_TOOLCHAIN_DIR'], 'usr', 'bin', 'libtool')\n self.project_filename = os.path.join(os.environ['PROJECT_FILE_PATH'], \"project.pbxproj\")\n self.local_exe_path = os.path.join(os.environ['TARGET_BUILD_DIR'], os.environ['EXECUTABLE_PATH'])\n self.local_architectures = os.environ['ARCHS'].split(' ')\n self.local_built_fw_path = os.path.join(os.environ['TARGET_BUILD_DIR'], os.environ['WRAPPER_NAME'])\n self.local_built_embedded_fw_path = os.path.splitext(self.local_built_fw_path)[0] + \".embeddedframework\"\n self.local_linked_archive_paths = [self.get_linked_ufw_archive_path(arch) for arch in self.local_architectures]\n self.local_platform = os.environ['PLATFORM_NAME']\n other_platforms = os.environ['SUPPORTED_PLATFORMS'].split(' ')\n other_platforms.remove(self.local_platform)\n self.other_platform = other_platforms[0]\n\n sdk_name = os.environ['SDK_NAME']\n if not sdk_name.startswith(self.local_platform):\n raise Exception(\"%s didn't start with %s\" % (sdk_name, self.local_platform))\n self.sdk_version = sdk_name[len(self.local_platform):]\n\n # Load an Xcode project file.\n #\n def load_from_file(self, filename):\n project_file = json.loads(subprocess.check_output([\"plutil\", \"-convert\", \"json\", \"-o\", \"-\", filename]))\n all_objects = project_file['objects']\n del project_file['objects']\n for obj in all_objects.values():\n self.fix_keys(obj)\n self.unpack_objects(self.build_dereference_list(all_objects, None, None, project_file))\n self.unpack_objects(self.build_dereference_list(all_objects, None, None, all_objects.values()))\n project_data = project_file['rootObject']\n self.build_full_paths(project_data, splitpath(os.environ['SOURCE_ROOT']))\n return project_data\n\n def is_key(self, obj): \n return isinstance(obj, basestring) and len(obj) == 24 and re.search('^[0-9a-fA-F]+$', obj) is not None\n \n def build_dereference_list(self, all_objects, parent, key, obj):\n deref_list = []\n if self.is_key(obj):\n dereferenced = all_objects.get(obj, obj)\n if dereferenced is not obj:\n deref_list.append((parent, key, obj, dereferenced))\n elif isinstance(obj, collections.Mapping):\n for k, v in obj.iteritems():\n deref_list += self.build_dereference_list(all_objects, obj, k, v)\n elif isinstance(obj, collections.Iterable) and not isinstance(obj, basestring):\n for item in obj:\n deref_list += self.build_dereference_list(all_objects, obj, None, item)\n return deref_list\n \n def unpack_objects(self, deref_list):\n for parent, key, orig, obj in deref_list:\n if key is None:\n parent.remove(orig)\n parent.append(obj)\n else:\n parent[key] = obj\n\n # Store the full path, separated into components, to a node inside the node\n # as \"pathComponents\". Also recurse into that node if it's a group.\n #\n def build_full_paths(self, node, base_path):\n # Some nodes are relative to a different source tree, specified as an\n # env variable.\n if node.get('sourceTree', '') != '':\n new_base_path = os.environ.get(node['sourceTree'], None)\n if new_base_path:\n base_path = splitpath(new_base_path)\n # Add the current node's path, if any.\n if node.get('path', False):\n base_path = base_path + splitpath(node['path'])\n node['pathComponents'] = base_path\n # Recurse if this is a group.\n if node['isa'] == 'PBXGroup':\n for child in node['children']:\n self.build_full_paths(child, base_path)\n elif node['isa'] == 'PBXProject':\n self.build_full_paths(node['mainGroup'], base_path)\n self.build_full_paths(node['productRefGroup'], base_path)\n for child in node['targets']:\n self.build_full_paths(child, base_path)\n projectRefs = node.get('projectReferences', None)\n if projectRefs is not None:\n for child in projectRefs[0].values():\n self.build_full_paths(child, base_path)\n\n # Fix up any inconvenient keys.\n #\n def fix_keys(self, obj):\n key_remappings = {'lastKnownFileType': 'fileType', 'explicitFileType': 'fileType'}\n for key in list(set(key_remappings.keys()) & set(obj.keys())):\n obj[key_remappings[key]] = obj[key]\n del obj[key]\n\n # Get the files from a build phase.\n #\n def get_build_phase_files(self, build_phase_name, filter_func):\n build_phase = filter(lambda x: x['isa'] == build_phase_name, self.target['buildPhases'])[0]\n build_files = filter(filter_func, build_phase['files'])\n return [x['fileRef'] for x in build_files]\n\n # Get the truncated paths of all headers that start with the specified\n # relative path. Paths are read and returned as fully separated lists.\n # e.g. ['Some', 'Path', 'To', 'A', 'Header'] with relative_path of\n # ['Some', 'Path'] gets truncated to ['To', 'A', 'Header']\n #\n def movable_headers_relative_to(self, relative_path):\n rel_path_length = len(relative_path)\n result = filter(lambda path: len(path) >= rel_path_length and\n path[:rel_path_length] == relative_path, self.header_paths)\n return [path[rel_path_length:] for path in result]\n\n # Get the full path to where a linkable archive (library or framework)\n # is supposed to be.\n #\n def get_linked_archive_path(self, architecture):\n return os.path.join(os.environ['OBJECT_FILE_DIR_%s' % os.environ['CURRENT_VARIANT']],\n architecture,\n os.environ['EXECUTABLE_NAME'])\n\n # Get the full path to our custom linked archive of the project.\n #\n def get_linked_ufw_archive_path(self, architecture):\n return self.get_linked_archive_path(architecture) + \".ufwbuild\"\n\n # Get the full path to the executable of an archive.\n #\n def get_exe_path(self, node):\n path = os.path.join(*node['pathComponents'])\n if node['fileType'] == 'wrapper.framework':\n # Frameworks are directories, so go one deeper\n path = os.path.join(path, os.path.splitext(node['pathComponents'][-1])[0])\n return path\n\n # Get the path to the directory containing the archive.\n #\n def get_containing_path(self, node):\n return os.path.join(*node['pathComponents'])\n \n def get_archive_search_paths(self):\n log.info(\"Search paths = %s\" % set([self.get_containing_path(fw) for fw in self.static_frameworks] + [self.get_containing_path(fw) for fw in self.static_libraries]))\n return set([self.get_containing_path(fw) for fw in self.static_frameworks] + [self.get_containing_path(fw) for fw in self.static_libraries])\n\n # Command to link all objects of a single architecture.\n #\n def get_single_arch_link_command(self, architecture):\n cmd = [self.libtool_path,\n \"-static\",\n \"-arch_only\", architecture,\n \"-syslibroot\", os.environ['SDKROOT'],\n \"-L%s\" % os.environ['TARGET_BUILD_DIR'],\n \"-filelist\", os.environ['LINK_FILE_LIST_%s_%s' % (os.environ['CURRENT_VARIANT'], architecture)]]\n if os.environ.get('OTHER_LDFLAGS', False):\n cmd += [os.environ['OTHER_LDFLAGS']]\n if os.environ.get('WARNING_LDFLAGS', False):\n cmd += [os.environ['WARNING_LDFLAGS']]\n# cmd += [\"-L%s\" % libpath for libpath in self.get_archive_search_paths()]\n cmd += [self.get_exe_path(fw) for fw in self.static_frameworks]\n cmd += [self.get_exe_path(lib) for lib in self.static_libraries]\n cmd += [\"-o\", self.get_linked_ufw_archive_path(architecture)]\n return cmd\n\n # Command to link all local architectures for the current configuration\n # into an archive. This reads all libraries + the UFW-built archives and\n # overwrites the final product.\n #\n def get_local_archs_link_command(self):\n cmd = [self.libtool_path,\n \"-static\"]\n cmd += self.local_linked_archive_paths\n cmd += [self.get_exe_path(fw) for fw in self.static_frameworks]\n cmd += [self.get_exe_path(lib) for lib in self.static_libraries]\n cmd += [\"-o\", os.path.join(os.environ['TARGET_BUILD_DIR'], os.environ['EXECUTABLE_PATH'])]\n return cmd\n\n # Command to link all architectures into a universal archive.\n # This reads all UFW-built archives and overwrites the final product.\n #\n def get_all_archs_link_command(self):\n cmd = [self.libtool_path,\n \"-static\"]\n cmd += self.local_linked_archive_paths + self.build_state.slave_linked_archive_paths\n cmd += [\"-o\", os.path.join(os.environ['TARGET_BUILD_DIR'], os.environ['EXECUTABLE_PATH'])]\n return cmd\n\n # Build up an environment for the slave process. This uses BUILD_ROOT\n # and TEMP_ROOT to convert all environment variables to values suitable\n # for the slave build environment so that xcodebuild doesn't try to build\n # in the project directory under \"build\".\n #\n def get_slave_environment(self):\n ignored = ['LD_MAP_FILE_PATH',\n 'HEADER_SEARCH_PATHS',\n 'LIBRARY_SEARCH_PATHS',\n 'FRAMEWORK_SEARCH_PATHS']\n build_root = os.environ['BUILD_ROOT']\n temp_root = os.environ['TEMP_ROOT']\n newenv = {}\n for key, value in os.environ.items():\n if key not in ignored and not key.startswith('LINK_FILE_LIST_') and not key.startswith('LD_DEPENDENCY_'):\n if build_root in value or temp_root in value:\n newenv[key] = value.replace(self.local_platform, self.other_platform)\n return newenv\n\n # Command to invoke xcodebuild on the slave platform.\n #\n def get_slave_project_build_command(self):\n cmd = [\"xcodebuild\",\n \"-project\",\n os.environ['PROJECT_FILE_PATH'],\n \"-target\",\n os.environ['TARGET_NAME'],\n \"-configuration\",\n os.environ['CONFIGURATION'],\n \"-sdk\",\n self.other_platform + self.sdk_version]\n cmd += [\"%s=%s\" % (key, value) for key, value in self.get_slave_environment().items()]\n cmd += [\"UFW_MASTER_PLATFORM=\" + os.environ['PLATFORM_NAME']]\n cmd += [os.environ['ACTION']]\n return cmd\n\n\n\n##############################################################################\n#\n# Utility Functions\n#\n##############################################################################\n\n# Split a path into a list of path components.\n#\ndef splitpath(path, maxdepth=20):\n (head, tail) = os.path.split(path)\n return splitpath(head, maxdepth - 1) + [tail] if maxdepth and head and head != path else [ head or tail ]\n\n# Remove all subdirectories under a path.\n#\ndef remove_subdirs(path, ignore_files):\n if os.path.exists(path):\n for filename in filter(lambda x: x not in ignore_files, os.listdir(path)):\n fullpath = os.path.join(path, filename)\n if os.path.isdir(fullpath):\n log.info(\"Remove %s\" % fullpath)\n shutil.rmtree(fullpath)\n\n# Make whatever parent paths are necessary for a path to exist.\n#\ndef ensure_path_exists(path):\n if not os.path.isdir(path):\n os.makedirs(path)\n\n# Make whatever parent paths are necessary for a path's parent to exist.\n#\ndef ensure_parent_exists(path):\n parent = os.path.dirname(path)\n if not os.path.isdir(parent):\n os.makedirs(parent)\n\n# Remove a file or dir if it exists.\n#\ndef remove_path(path):\n if os.path.exists(path):\n if os.path.isdir(path) and not os.path.islink(path):\n shutil.rmtree(path)\n else:\n os.remove(path)\n\n# Move a file or dir, replacing the destination if it exists.\n#\ndef move_file(src, dst):\n if src == dst or not os.path.isfile(src):\n return\n log.info(\"Move %s to %s\" % (src, dst))\n ensure_parent_exists(dst)\n remove_path(dst)\n shutil.move(src, dst)\n\n# Copy a file or dir, replacing the destination if it exists already.\n#\ndef copy_overwrite(src, dst):\n if src != dst:\n remove_path(dst)\n ensure_parent_exists(dst)\n shutil.copytree(src, dst, symlinks=True)\n\n# Attempt to symlink link_path -> link_to.\n# link_to must be a path relative to link_path's parent and must exist.\n# If link_path already exists, do nothing.\n#\ndef attempt_symlink(link_path, link_to):\n # Only allow linking to an existing file\n os.stat(os.path.abspath(os.path.join(link_path, \"..\", link_to)))\n\n # Only make the link if it hasn't already been made\n if not os.path.exists(link_path):\n log.info(\"Symlink %s -> %s\" % (link_path, link_to))\n os.symlink(link_to, link_path)\n\n# Takes the last entry in an array-based path and returns a normal path\n# relative to base_path.\n#\ndef top_level_file_path(base_path, path_list):\n return os.path.join(base_path, os.path.split(path_list[-1])[-1])\n\n# Takes all entries in an array-based path and returns a normal path\n# relative to base_path.\n#\ndef full_file_path(base_path, path_list):\n return os.path.join(*([base_path] + path_list))\n\n# Print a command before executing it.\n# Also print out all output from the command to STDOUT.\n#\ndef print_and_call(cmd):\n log.info(\"Cmd \" + \" \".join(cmd))\n p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)\n result = p.communicate()[0]\n if len(result) > 0:\n log.info(result)\n if p.returncode != 0:\n raise subprocess.CalledProcessError(p.returncode, cmd)\n\n# Special print-and-call command for the slave build that strips out\n# xcodebuild's spammy list of environment variables.\n#\ndef print_and_call_slave_build(cmd, other_platform):\n separator = '=== BUILD NATIVE TARGET '\n p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)\n result = p.communicate()[0].split(separator)\n if len(result) == 1:\n result = result[0]\n else:\n result = separator + result[1]\n log.info(\"Cmd \" + \" \".join(cmd) + \"\\n\" + result)\n if p.returncode != 0:\n raise subprocess.CalledProcessError(p.returncode, cmd)\n\n# Issue a warning and record that a warning has been issued.\n#\ndef issue_warning(msg, *args, **kwargs):\n global issued_warnings\n issued_warnings = True\n log.warn(msg, *args, **kwargs)\n\n\n\n##############################################################################\n#\n# Main Application\n#\n##############################################################################\n\n# Check if we are running as master.\n#\ndef is_master():\n return os.environ.get('UFW_MASTER_PLATFORM', os.environ['PLATFORM_NAME']) == os.environ['PLATFORM_NAME']\n\n# DerivedData should almost never appear in any framework, library, or header\n# search paths. However, Xcode will sometimes add them in, so we check to make\n# sure.\n#\ndef check_for_derived_data_in_search_paths(project):\n search_path_keys = [\"FRAMEWORK_SEARCH_PATHS\", \"LIBRARY_SEARCH_PATHS\", \"HEADER_SEARCH_PATHS\"]\n build_configs = project.target['buildConfigurationList']['buildConfigurations']\n build_settings = filter(lambda x: x['name'] == os.environ['CONFIGURATION'], build_configs)[0]['buildSettings']\n \n found_something = False\n for path_key in filter(lambda x: x in build_settings, search_path_keys):\n path = build_settings[path_key]\n if \"DerivedData\" in path:\n found_something = True\n log.warn(\"Derived data in %s\" % path)\n issue_warning(\"'%s' contains reference to 'DerivedData'.\" % path_key)\n if found_something:\n log.warn(\"Check your build settings and remove any entries that contain paths inside the DerivedData folder.\")\n log.warn(\"Otherwise you can disable this warning by changing 'config_warn_derived_data' in this script.\")\n\n# Link local architectures into their respective archives.\n#\ndef link_local_archs(project):\n for arch in project.local_architectures:\n print_and_call(project.get_single_arch_link_command(arch))\n\n# Link only the local architectures into the final product, not the slave\n# architectures. For iphoneos, this will be armv6, armv7. For simulator, this\n# will be i386.\n#\ndef link_combine_local_archs(project):\n print_and_call(project.get_local_archs_link_command())\n\n# Link all architectures into the final product.\n#\ndef link_combine_all_archs(project):\n print_and_call(project.get_all_archs_link_command())\n\n# Check if we should open the build directory after a successful build.\n#\ndef should_open_build_dir():\n env_setting = os.environ.get('UFW_OPEN_BUILD_DIR', None)\n if env_setting is not None:\n return env_setting\n\n return config_open_build_dir\n\n# Open the build dir in Finder.\n#\ndef open_build_dir():\n print_and_call(['open', os.environ['TARGET_BUILD_DIR']])\n\n# Check if the build was started by selecting \"Archive\" under \"Product\" in\n# Xcode.\n#\ndef is_archive_build():\n # ACTION is always 'build', but perhaps Apple will fix this someday?\n archive_build = os.environ['ACTION'] == 'archive'\n\n if not archive_build:\n # This can be passed in as an env variable when building from command line.\n archive_build = os.environ.get('UFW_ACTION', None) == 'archive'\n\n build_dir = splitpath(os.environ['BUILD_DIR'])\n if not archive_build:\n # This partial path is used when you select \"archive\" from within Xcode.\n archive_build = 'ArchiveIntermediates' in build_dir\n\n # It only counts as a full archive build if this target is being built into\n # its own build dir (not being built as a dependency of another target)\n if archive_build:\n archive_build = os.environ['TARGET_NAME'] in build_dir\n \n return archive_build\n\n# Xcode by default throws all public headers into the top level directory.\n# This function moves them to their expected deep hierarchy.\n#\ndef build_deep_header_hierarchy(project):\n header_path_top = config_deep_header_top\n if not header_path_top:\n header_path_top = os.path.commonprefix(project.header_paths)\n else:\n header_path_top = splitpath(header_path_top)\n\n built_headers_path = os.path.join(os.environ['TARGET_BUILD_DIR'], os.environ['PUBLIC_HEADERS_FOLDER_PATH'])\n movable_headers = project.movable_headers_relative_to(header_path_top)\n\n # Remove subdirs if they only contain files that have been rebuilt\n ignore_headers = filter(lambda x: not os.path.isfile(top_level_file_path(built_headers_path, x)), movable_headers)\n remove_subdirs(built_headers_path, [file[0] for file in ignore_headers])\n\n # Move rebuilt headers into their proper subdirs\n for header in movable_headers:\n move_file(top_level_file_path(built_headers_path, header), full_file_path(built_headers_path, header))\n\n# Add all symlinks needed to make a full framework structure:\n#\n# MyFramework.framework\n# |-- MyFramework -> Versions/Current/MyFramework\n# |-- Headers -> Versions/Current/Headers\n# |-- Resources -> Versions/Current/Resources\n# `-- Versions\n# |-- A\n# | |-- MyFramework\n# | |-- Headers\n# | | `-- MyFramework.h\n# | `-- Resources\n# | |-- Info.plist\n# | |-- MyViewController.nib\n# | `-- en.lproj\n# | `-- InfoPlist.strings\n# `-- Current -> A\n#\ndef add_symlinks_to_framework(project):\n base_dir = project.local_built_fw_path\n attempt_symlink(os.path.join(base_dir, \"Versions\", \"Current\"), os.environ['FRAMEWORK_VERSION'])\n if os.path.isdir(os.path.join(base_dir, \"Versions\", \"Current\", \"Headers\")):\n attempt_symlink(os.path.join(base_dir, \"Headers\"), os.path.join(\"Versions\", \"Current\", \"Headers\"))\n if os.path.isdir(os.path.join(base_dir, \"Versions\", \"Current\", \"Resources\")):\n attempt_symlink(os.path.join(base_dir, \"Resources\"), os.path.join(\"Versions\", \"Current\", \"Resources\"))\n attempt_symlink(os.path.join(base_dir, os.environ['EXECUTABLE_NAME']), os.path.join(\"Versions\", \"Current\", os.environ['EXECUTABLE_NAME']))\n\n# Build an embedded framework structure.\n# An embedded framework contains the actual framework, plus a \"Resources\"\n# directory containing symlinks to all resources found in the actual framework,\n# with the exception of \"Info.plist\" and anything ending in \".lproj\":\n#\n# MyFramework.embeddedframework\n# |-- MyFramework.framework\n# | |-- MyFramework -> Versions/Current/MyFramework\n# | |-- Headers -> Versions/Current/Headers\n# | |-- Resources -> Versions/Current/Resources\n# | `-- Versions\n# | |-- A\n# | | |-- MyFramework\n# | | |-- Headers\n# | | | `-- MyFramework.h\n# | | `-- Resources\n# | | |-- Info.plist\n# | | |-- MyViewController.nib\n# | | `-- en.lproj\n# | | `-- InfoPlist.strings\n# | `-- Current -> A\n# `-- Resources\n# `-- MyViewController.nib -> ../MyFramework.framework/Resources/MyViewController.nib\n#\ndef build_embedded_framework(project):\n fw_path = project.local_built_fw_path\n embedded_path = project.local_built_embedded_fw_path\n fw_name = os.environ['WRAPPER_NAME']\n\n if (os.path.islink(fw_path)):\n # If the framework path is a link, the build result already in embeddedframework.\n # Just recreate embeddedframework's Resources\n remove_path(os.path.join(embedded_path, \"Resources\"))\n else:\n remove_path(embedded_path)\n ensure_path_exists(embedded_path)\n copy_overwrite(fw_path, os.path.join(embedded_path, fw_name))\n\n # Create embeddedframework's Resources \n ensure_path_exists(os.path.join(embedded_path, \"Resources\"))\n symlink_source = os.path.join(\"..\", fw_name, \"Resources\")\n symlink_path = os.path.join(embedded_path, \"Resources\")\n if os.path.isdir(os.path.join(fw_path, \"Resources\")):\n for file in filter(lambda x: x != \"Info.plist\" and not x.endswith(\".lproj\"), os.listdir(os.path.join(fw_path, \"Resources\"))):\n attempt_symlink(os.path.join(symlink_path, file), os.path.join(symlink_source, file))\n\n # Remove the normal framework and replace it with a symlink to the copy\n # in the embedded framework. This is needed because Xcode runs its strip\n # phase AFTER the script runs.\n embed_fw_wrapper = os.path.splitext(os.environ['WRAPPER_NAME'])[0] + \".embeddedframework\"\n remove_path(fw_path)\n attempt_symlink(fw_path, os.path.join(embed_fw_wrapper, os.environ['WRAPPER_NAME']))\n\n\n# Run the build process in slave mode to build the other configuration\n# (device/simulator).\n#\ndef run_slave_build(project):\n print_and_call_slave_build(project.get_slave_project_build_command(), project.other_platform)\n\n# Run the build process.\n#\ndef run_build():\n project = Project(os.path.join(os.environ['PROJECT_FILE_PATH'], \"project.pbxproj\"))\n\n # Issue warnings only if we're master.\n if is_master():\n if len(project.compilable_sources) == 0:\n raise Exception(\"No compilable sources found. Please add at least one source file to build target %s.\" % os.environ['TARGET_NAME'])\n\n if config_warn_derived_data:\n check_for_derived_data_in_search_paths(project)\n if config_warn_no_public_headers and len(project.public_headers) == 0:\n issue_warning('No headers in build target %s were marked public. Please move at least one header to \"Public\" in the \"Copy Headers\" build phase.' % os.environ['TARGET_NAME'])\n\n # Only build slave if this is an archive build.\n if is_archive_build():\n if is_master():\n log.debug(\"Building as MASTER\")\n # The slave-side linker tries to include this (nonexistent) path as\n # a library path.\n ensure_path_exists(project.get_slave_environment()['BUILT_PRODUCTS_DIR'])\n project.build_state.persist()\n run_slave_build(project)\n project.build_state.reload()\n else:\n log.debug(\"Building as SLAVE\")\n project.build_state.reload()\n project.build_state.set_slave_properties(project.local_architectures,\n project.local_linked_archive_paths,\n project.local_built_fw_path,\n project.local_built_embedded_fw_path)\n project.build_state.persist()\n\n link_local_archs(project)\n \n # Only do a universal binary when building an archive.\n if is_archive_build() and is_master():\n link_combine_all_archs(project)\n else:\n link_combine_local_archs(project)\n\n if config_deep_header_hierarchy:\n build_deep_header_hierarchy(project)\n\n add_symlinks_to_framework(project)\n \n if is_master():\n if config_framework_type == 'embeddedframework':\n build_embedded_framework(project)\n elif config_framework_type != 'framework':\n raise Exception(\"%s: Unknown framework type for config_framework_type\" % config_framework_type)\n\n\nif __name__ == \"__main__\":\n log_handler = logging.StreamHandler()\n log_handler.setFormatter(logging.Formatter(\"%(name)s (\" + os.environ['PLATFORM_NAME'] + \"): %(levelname)s: %(message)s\"))\n log.addHandler(log_handler)\n log.setLevel(config_log_level)\n\n error_code = 0\n prefix = \"M\" if is_master() else \"S\"\n log_handler.setFormatter(logging.Formatter(\"%(name)s (\" + prefix + \" \" + os.environ['PLATFORM_NAME'] + \"): %(levelname)s: %(message)s\"))\n\n log.debug(\"Begin build process\")\n\n if config_deep_header_top:\n config_deep_header_top = string.Template(config_deep_header_top).substitute(os.environ)\n\n try:\n run_build()\n if issued_warnings:\n if config_fail_on_warnings:\n error_code = 1\n log.warn(\"Build completed with warnings\")\n else:\n log.info(\"Build completed\")\n if not is_archive_build():\n log.info(\"Note: This is *NOT* a universal framework build. To build as a universal framework, do an archive build.\")\n log.info(\"To do an archive build from command line, use \\\"xcodebuild -configuration Release UFW_ACTION=archive clean build\\\"\")\n except Exception:\n traceback.print_exc(file=sys.stdout)\n error_code = 1\n log.error(\"Build failed\")\n finally:\n if error_code == 0 and is_archive_build() and is_master():\n log.info(\"Built framework is in \" + os.environ['TARGET_BUILD_DIR'])\n if should_open_build_dir():\n open_build_dir()\n sys.exit(error_code)\n";
479 | showEnvVarsInLog = 0;
480 | };
481 | D42800E89B7CB74D0CA460F9 /* Copy Pods Resources */ = {
482 | isa = PBXShellScriptBuildPhase;
483 | buildActionMask = 2147483647;
484 | files = (
485 | );
486 | inputPaths = (
487 | );
488 | name = "Copy Pods Resources";
489 | outputPaths = (
490 | );
491 | runOnlyForDeploymentPostprocessing = 0;
492 | shellPath = /bin/sh;
493 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FrameAccessor/Pods-FrameAccessor-resources.sh\"\n";
494 | showEnvVarsInLog = 0;
495 | };
496 | /* End PBXShellScriptBuildPhase section */
497 |
498 | /* Begin PBXSourcesBuildPhase section */
499 | 198C9BF0181F92E70021C1C7 /* Sources */ = {
500 | isa = PBXSourcesBuildPhase;
501 | buildActionMask = 2147483647;
502 | files = (
503 | 198C9C04181F92E70021C1C7 /* main.m in Sources */,
504 | 198C9C08181F92E70021C1C7 /* AppDelegate.m in Sources */,
505 | 198C9C11181F92E70021C1C7 /* ViewController.m in Sources */,
506 | 198C9C20181F932C0021C1C7 /* ScrollViewFrameAccessor.m in Sources */,
507 | 198C9C21181F932C0021C1C7 /* ViewFrameAccessor.m in Sources */,
508 | );
509 | runOnlyForDeploymentPostprocessing = 0;
510 | };
511 | 46D365C419471C90005B8F7D /* Sources */ = {
512 | isa = PBXSourcesBuildPhase;
513 | buildActionMask = 2147483647;
514 | files = (
515 | 46D3661919472295005B8F7D /* ScrollViewFrameAccessor.m in Sources */,
516 | 46D365D819471D34005B8F7D /* ViewFrameAccessor.m in Sources */,
517 | );
518 | runOnlyForDeploymentPostprocessing = 0;
519 | };
520 | 46D365DD19471DF3005B8F7D /* Sources */ = {
521 | isa = PBXSourcesBuildPhase;
522 | buildActionMask = 2147483647;
523 | files = (
524 | 46D3660C19471E0B005B8F7D /* ViewFrameAccessor.m in Sources */,
525 | );
526 | runOnlyForDeploymentPostprocessing = 0;
527 | };
528 | E0D90D7C1AE2EC8500266F3F /* Sources */ = {
529 | isa = PBXSourcesBuildPhase;
530 | buildActionMask = 2147483647;
531 | files = (
532 | E0D90D851AE2EC8500266F3F /* FrameAccessorTests.m in Sources */,
533 | );
534 | runOnlyForDeploymentPostprocessing = 0;
535 | };
536 | /* End PBXSourcesBuildPhase section */
537 |
538 | /* Begin PBXTargetDependency section */
539 | E0D90D871AE2EC8500266F3F /* PBXTargetDependency */ = {
540 | isa = PBXTargetDependency;
541 | target = 198C9BF3181F92E70021C1C7 /* FrameAccessor */;
542 | targetProxy = E0D90D861AE2EC8500266F3F /* PBXContainerItemProxy */;
543 | };
544 | /* End PBXTargetDependency section */
545 |
546 | /* Begin PBXVariantGroup section */
547 | 198C9C00181F92E70021C1C7 /* InfoPlist.strings */ = {
548 | isa = PBXVariantGroup;
549 | children = (
550 | 198C9C01181F92E70021C1C7 /* en */,
551 | );
552 | name = InfoPlist.strings;
553 | sourceTree = "";
554 | };
555 | 198C9C12181F92E70021C1C7 /* ViewController.xib */ = {
556 | isa = PBXVariantGroup;
557 | children = (
558 | 198C9C13181F92E70021C1C7 /* en */,
559 | );
560 | name = ViewController.xib;
561 | sourceTree = "";
562 | };
563 | 46D365CE19471C90005B8F7D /* InfoPlist.strings */ = {
564 | isa = PBXVariantGroup;
565 | children = (
566 | 46D365CF19471C90005B8F7D /* en */,
567 | );
568 | name = InfoPlist.strings;
569 | sourceTree = "";
570 | };
571 | 46D365EC19471DF3005B8F7D /* InfoPlist.strings */ = {
572 | isa = PBXVariantGroup;
573 | children = (
574 | 46D365ED19471DF3005B8F7D /* en */,
575 | );
576 | name = InfoPlist.strings;
577 | sourceTree = "";
578 | };
579 | /* End PBXVariantGroup section */
580 |
581 | /* Begin XCBuildConfiguration section */
582 | 198C9C15181F92E70021C1C7 /* Debug */ = {
583 | isa = XCBuildConfiguration;
584 | buildSettings = {
585 | ALWAYS_SEARCH_USER_PATHS = NO;
586 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
587 | CLANG_CXX_LIBRARY = "libc++";
588 | CLANG_ENABLE_OBJC_ARC = YES;
589 | CLANG_WARN_CONSTANT_CONVERSION = YES;
590 | CLANG_WARN_EMPTY_BODY = YES;
591 | CLANG_WARN_ENUM_CONVERSION = YES;
592 | CLANG_WARN_INT_CONVERSION = YES;
593 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
594 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
595 | COPY_PHASE_STRIP = NO;
596 | GCC_C_LANGUAGE_STANDARD = gnu99;
597 | GCC_DYNAMIC_NO_PIC = NO;
598 | GCC_GENERATE_TEST_COVERAGE_FILES = YES;
599 | GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES;
600 | GCC_OPTIMIZATION_LEVEL = 0;
601 | GCC_PREPROCESSOR_DEFINITIONS = (
602 | "DEBUG=1",
603 | "$(inherited)",
604 | );
605 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
606 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
607 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
608 | GCC_WARN_UNUSED_VARIABLE = YES;
609 | IPHONEOS_DEPLOYMENT_TARGET = 6.1;
610 | ONLY_ACTIVE_ARCH = YES;
611 | SDKROOT = iphoneos;
612 | };
613 | name = Debug;
614 | };
615 | 198C9C16181F92E70021C1C7 /* Release */ = {
616 | isa = XCBuildConfiguration;
617 | buildSettings = {
618 | ALWAYS_SEARCH_USER_PATHS = NO;
619 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
620 | CLANG_CXX_LIBRARY = "libc++";
621 | CLANG_ENABLE_OBJC_ARC = YES;
622 | CLANG_WARN_CONSTANT_CONVERSION = YES;
623 | CLANG_WARN_EMPTY_BODY = YES;
624 | CLANG_WARN_ENUM_CONVERSION = YES;
625 | CLANG_WARN_INT_CONVERSION = YES;
626 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
627 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
628 | COPY_PHASE_STRIP = YES;
629 | GCC_C_LANGUAGE_STANDARD = gnu99;
630 | GCC_GENERATE_TEST_COVERAGE_FILES = YES;
631 | GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES;
632 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
633 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
634 | GCC_WARN_UNUSED_VARIABLE = YES;
635 | IPHONEOS_DEPLOYMENT_TARGET = 6.1;
636 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
637 | SDKROOT = iphoneos;
638 | VALIDATE_PRODUCT = YES;
639 | };
640 | name = Release;
641 | };
642 | 198C9C18181F92E70021C1C7 /* Debug */ = {
643 | isa = XCBuildConfiguration;
644 | baseConfigurationReference = 478D0DB65C02FB20F28C121A /* Pods-FrameAccessor.debug.xcconfig */;
645 | buildSettings = {
646 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
647 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
648 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
649 | GCC_PREFIX_HEADER = "FrameAccessor/FrameAccessor-Prefix.pch";
650 | INFOPLIST_FILE = "FrameAccessor/FrameAccessor-Info.plist";
651 | IPHONEOS_DEPLOYMENT_TARGET = 6.1;
652 | PRODUCT_NAME = "$(TARGET_NAME)";
653 | WRAPPER_EXTENSION = app;
654 | };
655 | name = Debug;
656 | };
657 | 198C9C19181F92E70021C1C7 /* Release */ = {
658 | isa = XCBuildConfiguration;
659 | baseConfigurationReference = E0A2062C6B33159386456968 /* Pods-FrameAccessor.release.xcconfig */;
660 | buildSettings = {
661 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
662 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
663 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
664 | GCC_PREFIX_HEADER = "FrameAccessor/FrameAccessor-Prefix.pch";
665 | INFOPLIST_FILE = "FrameAccessor/FrameAccessor-Info.plist";
666 | IPHONEOS_DEPLOYMENT_TARGET = 6.1;
667 | PRODUCT_NAME = "$(TARGET_NAME)";
668 | WRAPPER_EXTENSION = app;
669 | };
670 | name = Release;
671 | };
672 | 46D365D519471C90005B8F7D /* Debug */ = {
673 | isa = XCBuildConfiguration;
674 | buildSettings = {
675 | ARCHS = "$(ARCHS_STANDARD)";
676 | CLANG_ENABLE_MODULES = YES;
677 | CLANG_WARN_BOOL_CONVERSION = YES;
678 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
679 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
680 | CONTENTS_FOLDER_PATH = "$(WRAPPER_NAME)/Versions/$(FRAMEWORK_VERSION)";
681 | DEAD_CODE_STRIPPING = NO;
682 | DYLIB_COMPATIBILITY_VERSION = 1;
683 | DYLIB_CURRENT_VERSION = 1;
684 | FRAMEWORK_VERSION = A;
685 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
686 | GCC_PREFIX_HEADER = "FrameAccessor-iOS/FrameAccessor-iOS-Prefix.pch";
687 | GCC_PREPROCESSOR_DEFINITIONS = (
688 | "DEBUG=1",
689 | "$(inherited)",
690 | );
691 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
692 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
693 | GCC_WARN_UNDECLARED_SELECTOR = YES;
694 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
695 | GCC_WARN_UNUSED_FUNCTION = YES;
696 | HEADER_SEARCH_PATHS = (
697 | "$(inherited)",
698 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
699 | "$(SOURCE_ROOT)",
700 | );
701 | INFOPLIST_FILE = "FrameAccessor-iOS/FrameAccessor-iOS-Info.plist";
702 | INFOPLIST_PATH = "$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/Info.plist";
703 | INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)";
704 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
705 | LINK_WITH_STANDARD_LIBRARIES = NO;
706 | MACH_O_TYPE = staticlib;
707 | PRODUCT_NAME = FrameAccessor;
708 | SKIP_INSTALL = YES;
709 | UNLOCALIZED_RESOURCES_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Resources";
710 | WRAPPER_EXTENSION = framework;
711 | };
712 | name = Debug;
713 | };
714 | 46D365D619471C90005B8F7D /* Release */ = {
715 | isa = XCBuildConfiguration;
716 | buildSettings = {
717 | ARCHS = "$(ARCHS_STANDARD)";
718 | CLANG_ENABLE_MODULES = YES;
719 | CLANG_WARN_BOOL_CONVERSION = YES;
720 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
721 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
722 | CONTENTS_FOLDER_PATH = "$(WRAPPER_NAME)/Versions/$(FRAMEWORK_VERSION)";
723 | DEAD_CODE_STRIPPING = NO;
724 | DYLIB_COMPATIBILITY_VERSION = 1;
725 | DYLIB_CURRENT_VERSION = 1;
726 | ENABLE_NS_ASSERTIONS = NO;
727 | FRAMEWORK_VERSION = A;
728 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
729 | GCC_PREFIX_HEADER = "FrameAccessor-iOS/FrameAccessor-iOS-Prefix.pch";
730 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
731 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
732 | GCC_WARN_UNDECLARED_SELECTOR = YES;
733 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
734 | GCC_WARN_UNUSED_FUNCTION = YES;
735 | HEADER_SEARCH_PATHS = (
736 | "$(inherited)",
737 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
738 | "$(SOURCE_ROOT)",
739 | );
740 | INFOPLIST_FILE = "FrameAccessor-iOS/FrameAccessor-iOS-Info.plist";
741 | INFOPLIST_PATH = "$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/Info.plist";
742 | INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)";
743 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
744 | LINK_WITH_STANDARD_LIBRARIES = NO;
745 | MACH_O_TYPE = staticlib;
746 | PRODUCT_NAME = FrameAccessor;
747 | SKIP_INSTALL = YES;
748 | UNLOCALIZED_RESOURCES_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Resources";
749 | WRAPPER_EXTENSION = framework;
750 | };
751 | name = Release;
752 | };
753 | 46D3660719471DF3005B8F7D /* Debug */ = {
754 | isa = XCBuildConfiguration;
755 | buildSettings = {
756 | ARCHS = "$(ARCHS_STANDARD)";
757 | CLANG_ENABLE_MODULES = YES;
758 | CLANG_WARN_BOOL_CONVERSION = YES;
759 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
760 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
761 | COMBINE_HIDPI_IMAGES = YES;
762 | DYLIB_COMPATIBILITY_VERSION = 1;
763 | DYLIB_CURRENT_VERSION = 1;
764 | FRAMEWORK_SEARCH_PATHS = (
765 | "$(inherited)",
766 | "$(DEVELOPER_FRAMEWORKS_DIR)",
767 | );
768 | FRAMEWORK_VERSION = A;
769 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
770 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
771 | GCC_PREFIX_HEADER = "FrameAccessor-OSX/FrameAccessor-OSX-Prefix.pch";
772 | GCC_PREPROCESSOR_DEFINITIONS = (
773 | "DEBUG=1",
774 | "$(inherited)",
775 | );
776 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
777 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
778 | GCC_WARN_UNDECLARED_SELECTOR = YES;
779 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
780 | GCC_WARN_UNUSED_FUNCTION = YES;
781 | INFOPLIST_FILE = "FrameAccessor-OSX/FrameAccessor-OSX-Info.plist";
782 | MACOSX_DEPLOYMENT_TARGET = 10.9;
783 | PRODUCT_NAME = FrameAccessor;
784 | SDKROOT = macosx;
785 | SKIP_INSTALL = YES;
786 | WRAPPER_EXTENSION = framework;
787 | };
788 | name = Debug;
789 | };
790 | 46D3660819471DF3005B8F7D /* Release */ = {
791 | isa = XCBuildConfiguration;
792 | buildSettings = {
793 | ARCHS = "$(ARCHS_STANDARD)";
794 | CLANG_ENABLE_MODULES = YES;
795 | CLANG_WARN_BOOL_CONVERSION = YES;
796 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
797 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
798 | COMBINE_HIDPI_IMAGES = YES;
799 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
800 | DYLIB_COMPATIBILITY_VERSION = 1;
801 | DYLIB_CURRENT_VERSION = 1;
802 | ENABLE_NS_ASSERTIONS = NO;
803 | FRAMEWORK_SEARCH_PATHS = (
804 | "$(inherited)",
805 | "$(DEVELOPER_FRAMEWORKS_DIR)",
806 | );
807 | FRAMEWORK_VERSION = A;
808 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
809 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
810 | GCC_PREFIX_HEADER = "FrameAccessor-OSX/FrameAccessor-OSX-Prefix.pch";
811 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
812 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
813 | GCC_WARN_UNDECLARED_SELECTOR = YES;
814 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
815 | GCC_WARN_UNUSED_FUNCTION = YES;
816 | INFOPLIST_FILE = "FrameAccessor-OSX/FrameAccessor-OSX-Info.plist";
817 | MACOSX_DEPLOYMENT_TARGET = 10.9;
818 | PRODUCT_NAME = FrameAccessor;
819 | SDKROOT = macosx;
820 | SKIP_INSTALL = YES;
821 | WRAPPER_EXTENSION = framework;
822 | };
823 | name = Release;
824 | };
825 | E0D90D881AE2EC8500266F3F /* Debug */ = {
826 | isa = XCBuildConfiguration;
827 | buildSettings = {
828 | BUNDLE_LOADER = "$(TEST_HOST)";
829 | CLANG_ENABLE_MODULES = YES;
830 | CLANG_WARN_BOOL_CONVERSION = YES;
831 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
832 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
833 | CLANG_WARN_UNREACHABLE_CODE = YES;
834 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
835 | ENABLE_STRICT_OBJC_MSGSEND = YES;
836 | FRAMEWORK_SEARCH_PATHS = (
837 | "$(SDKROOT)/Developer/Library/Frameworks",
838 | "$(inherited)",
839 | );
840 | GCC_NO_COMMON_BLOCKS = YES;
841 | GCC_PREPROCESSOR_DEFINITIONS = (
842 | "DEBUG=1",
843 | "$(inherited)",
844 | );
845 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
846 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
847 | GCC_WARN_UNDECLARED_SELECTOR = YES;
848 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
849 | GCC_WARN_UNUSED_FUNCTION = YES;
850 | INFOPLIST_FILE = FrameAccessorTests/Info.plist;
851 | IPHONEOS_DEPLOYMENT_TARGET = 8.3;
852 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
853 | MTL_ENABLE_DEBUG_INFO = YES;
854 | PRODUCT_NAME = "$(TARGET_NAME)";
855 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FrameAccessor.app/FrameAccessor";
856 | };
857 | name = Debug;
858 | };
859 | E0D90D891AE2EC8500266F3F /* Release */ = {
860 | isa = XCBuildConfiguration;
861 | buildSettings = {
862 | BUNDLE_LOADER = "$(TEST_HOST)";
863 | CLANG_ENABLE_MODULES = YES;
864 | CLANG_WARN_BOOL_CONVERSION = YES;
865 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
866 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
867 | CLANG_WARN_UNREACHABLE_CODE = YES;
868 | COPY_PHASE_STRIP = NO;
869 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
870 | ENABLE_NS_ASSERTIONS = NO;
871 | ENABLE_STRICT_OBJC_MSGSEND = YES;
872 | FRAMEWORK_SEARCH_PATHS = (
873 | "$(SDKROOT)/Developer/Library/Frameworks",
874 | "$(inherited)",
875 | );
876 | GCC_NO_COMMON_BLOCKS = YES;
877 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
878 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
879 | GCC_WARN_UNDECLARED_SELECTOR = YES;
880 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
881 | GCC_WARN_UNUSED_FUNCTION = YES;
882 | INFOPLIST_FILE = FrameAccessorTests/Info.plist;
883 | IPHONEOS_DEPLOYMENT_TARGET = 8.3;
884 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
885 | MTL_ENABLE_DEBUG_INFO = NO;
886 | PRODUCT_NAME = "$(TARGET_NAME)";
887 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FrameAccessor.app/FrameAccessor";
888 | };
889 | name = Release;
890 | };
891 | /* End XCBuildConfiguration section */
892 |
893 | /* Begin XCConfigurationList section */
894 | 198C9BEF181F92E70021C1C7 /* Build configuration list for PBXProject "FrameAccessor" */ = {
895 | isa = XCConfigurationList;
896 | buildConfigurations = (
897 | 198C9C15181F92E70021C1C7 /* Debug */,
898 | 198C9C16181F92E70021C1C7 /* Release */,
899 | );
900 | defaultConfigurationIsVisible = 0;
901 | defaultConfigurationName = Release;
902 | };
903 | 198C9C17181F92E70021C1C7 /* Build configuration list for PBXNativeTarget "FrameAccessor" */ = {
904 | isa = XCConfigurationList;
905 | buildConfigurations = (
906 | 198C9C18181F92E70021C1C7 /* Debug */,
907 | 198C9C19181F92E70021C1C7 /* Release */,
908 | );
909 | defaultConfigurationIsVisible = 0;
910 | defaultConfigurationName = Release;
911 | };
912 | 46D365D719471C90005B8F7D /* Build configuration list for PBXNativeTarget "FrameAccessor-iOS" */ = {
913 | isa = XCConfigurationList;
914 | buildConfigurations = (
915 | 46D365D519471C90005B8F7D /* Debug */,
916 | 46D365D619471C90005B8F7D /* Release */,
917 | );
918 | defaultConfigurationIsVisible = 0;
919 | defaultConfigurationName = Release;
920 | };
921 | 46D3660619471DF3005B8F7D /* Build configuration list for PBXNativeTarget "FrameAccessor-OSX" */ = {
922 | isa = XCConfigurationList;
923 | buildConfigurations = (
924 | 46D3660719471DF3005B8F7D /* Debug */,
925 | 46D3660819471DF3005B8F7D /* Release */,
926 | );
927 | defaultConfigurationIsVisible = 0;
928 | defaultConfigurationName = Release;
929 | };
930 | E0D90D8A1AE2EC8500266F3F /* Build configuration list for PBXNativeTarget "FrameAccessorTests" */ = {
931 | isa = XCConfigurationList;
932 | buildConfigurations = (
933 | E0D90D881AE2EC8500266F3F /* Debug */,
934 | E0D90D891AE2EC8500266F3F /* Release */,
935 | );
936 | defaultConfigurationIsVisible = 0;
937 | defaultConfigurationName = Release;
938 | };
939 | /* End XCConfigurationList section */
940 | };
941 | rootObject = 198C9BEC181F92E70021C1C7 /* Project object */;
942 | }
943 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor.xcodeproj/xcshareddata/xcschemes/FrameAccessor.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
75 |
77 |
83 |
84 |
85 |
86 |
87 |
88 |
94 |
96 |
102 |
103 |
104 |
105 |
107 |
108 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // FrameAccessor
4 | //
5 | // Created by Ivanenko Dmitry on 29.10.13.
6 | // Copyright (c) 2013 Artox Lab. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class ViewController;
12 |
13 | @interface AppDelegate : UIResponder
14 |
15 | @property (strong, nonatomic) UIWindow *window;
16 |
17 | @property (strong, nonatomic) ViewController *viewController;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // FrameAccessor
4 | //
5 | // Created by Ivanenko Dmitry on 29.10.13.
6 | // Copyright (c) 2013 Artox Lab. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | #import "ViewController.h"
12 |
13 | @implementation AppDelegate
14 |
15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
16 | {
17 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
18 | // Override point for customization after application launch.
19 | self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
20 | self.window.rootViewController = self.viewController;
21 | [self.window makeKeyAndVisible];
22 | return YES;
23 | }
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor/FrameAccessor-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIcons
12 |
13 | CFBundleIcons~ipad
14 |
15 | CFBundleIdentifier
16 | by.artox.${PRODUCT_NAME:rfc1034identifier}
17 | CFBundleInfoDictionaryVersion
18 | 6.0
19 | CFBundleName
20 | ${PRODUCT_NAME}
21 | CFBundlePackageType
22 | APPL
23 | CFBundleShortVersionString
24 | 1.0
25 | CFBundleSignature
26 | ????
27 | CFBundleVersion
28 | 1.0
29 | LSRequiresIPhoneOS
30 |
31 | UILaunchStoryboardName
32 | ViewController
33 | UIRequiredDeviceCapabilities
34 |
35 | armv7
36 |
37 | UISupportedInterfaceOrientations
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationLandscapeLeft
41 | UIInterfaceOrientationLandscapeRight
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor/FrameAccessor-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'FrameAccessor' target in the 'FrameAccessor' project
3 | //
4 |
5 | #import
6 |
7 | #ifndef __IPHONE_4_0
8 | #warning "This project uses features only available in iOS SDK 4.0 and later."
9 | #endif
10 |
11 | #ifdef __OBJC__
12 | #import
13 | #import
14 | #endif
15 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "1x",
6 | "size" : "57x57"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "2x",
11 | "size" : "57x57"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "60x60"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "1x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "29x29"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "2x",
31 | "size" : "40x40"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/Examples/FrameAccessor/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "minimum-system-version" : "7.0",
7 | "subtype" : "retina4",
8 | "scale" : "2x"
9 | },
10 | {
11 | "idiom" : "iphone",
12 | "scale" : "1x",
13 | "orientation" : "portrait"
14 | },
15 | {
16 | "idiom" : "iphone",
17 | "scale" : "2x",
18 | "orientation" : "portrait"
19 | },
20 | {
21 | "orientation" : "portrait",
22 | "idiom" : "iphone",
23 | "subtype" : "retina4",
24 | "scale" : "2x"
25 | },
26 | {
27 | "orientation" : "portrait",
28 | "idiom" : "iphone",
29 | "minimum-system-version" : "7.0",
30 | "scale" : "2x"
31 | }
32 | ],
33 | "info" : {
34 | "version" : 1,
35 | "author" : "xcode"
36 | }
37 | }
--------------------------------------------------------------------------------
/Examples/FrameAccessor/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // FrameAccessor
4 | //
5 | // Created by Ivanenko Dmitry on 29.10.13.
6 | // Copyright (c) 2013 Artox Lab. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // FrameAccessor
4 | //
5 | // Created by Ivanenko Dmitry on 29.10.13.
6 | // Copyright (c) 2013 Artox Lab. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "FrameAccessor.h"
11 |
12 |
13 | @implementation ViewController
14 |
15 | - (void)viewDidLoad
16 | {
17 | [super viewDidLoad];
18 |
19 | // Center
20 | UIView *rectAtCenter = [UIView new];
21 | rectAtCenter.backgroundColor = [UIColor redColor];
22 | rectAtCenter.viewSize = CGSizeMake(100., 100.);
23 | rectAtCenter.center = self.view.middlePoint;
24 | [self.view addSubview:rectAtCenter];
25 |
26 | // Top Left
27 | UIView *rectAtTopLeft = [UIView new];
28 | rectAtTopLeft.backgroundColor = [UIColor blueColor];
29 | rectAtTopLeft.viewSize = CGSizeMake(50., 50.);
30 | rectAtTopLeft.right = rectAtCenter.left - 25.;
31 | rectAtTopLeft.bottom = rectAtCenter.top - 25.;
32 | [self.view addSubview:rectAtTopLeft];
33 |
34 | // Top Right
35 | UIView *rectAtTopRight = [UIView new];
36 | rectAtTopRight.backgroundColor = [UIColor magentaColor];
37 | rectAtTopRight.viewSize = CGSizeMake(50., 50.);
38 | rectAtTopRight.left = rectAtCenter.right + 25.;
39 | rectAtTopRight.bottom = rectAtCenter.top - 25.;
40 | [self.view addSubview:rectAtTopRight];
41 |
42 | // Bottom Left
43 | UIView *rectAtBottomLeft = [UIView new];
44 | rectAtBottomLeft.backgroundColor = [UIColor greenColor];
45 | rectAtBottomLeft.viewSize = CGSizeMake(50., 50.);
46 | rectAtBottomLeft.right = rectAtTopLeft.right;
47 | rectAtBottomLeft.top = rectAtCenter.bottom + 25.;
48 | [self.view addSubview:rectAtBottomLeft];
49 |
50 | // Bottom Right
51 | UIView *rectAtBottomRight = [UIView new];
52 | rectAtBottomRight.backgroundColor = [UIColor brownColor];
53 | rectAtBottomRight.viewSize = CGSizeMake(50., 50.);
54 | rectAtBottomRight.left = rectAtTopRight.left;
55 | rectAtBottomRight.top = rectAtCenter.bottom + 25.;
56 | [self.view addSubview:rectAtBottomRight];
57 | }
58 |
59 | @end
60 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor/en.lproj/ViewController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1552
5 | 13A603
6 | 3084
7 | 1265
8 | 695.00
9 |
13 |
14 | IBProxyObject
15 | IBUIView
16 |
17 |
18 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
19 |
20 |
24 |
25 |
29 |
33 |
64 |
65 |
66 |
67 |
68 |
69 | view
70 |
71 |
72 |
73 | 7
74 |
75 |
76 |
77 |
78 |
79 | 0
80 |
81 |
82 |
83 |
84 |
85 | -1
86 |
87 |
88 | File's Owner
89 |
90 |
91 | -2
92 |
93 |
94 |
95 |
96 | 6
97 |
98 |
99 |
100 |
101 |
102 |
103 | ViewController
104 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
105 | UIResponder
106 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
107 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin
108 |
109 |
110 |
111 |
112 |
113 | 7
114 |
115 |
116 |
117 |
118 | ViewController
119 | UIViewController
120 |
121 | IBProjectSource
122 | ./Classes/ViewController.h
123 |
124 |
125 |
126 |
127 | 0
128 | IBCocoaTouchFramework
129 | YES
130 | 3
131 | YES
132 | 2083
133 |
134 |
135 |
--------------------------------------------------------------------------------
/Examples/FrameAccessor/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // FrameAccessor
4 | //
5 | // Created by Ivanenko Dmitry on 29.10.13.
6 | // Copyright (c) 2013 Artox Lab. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char *argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Examples/FrameAccessorTests/FrameAccessorTests.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import
4 |
5 | @interface FrameAccessorTests : XCTestCase
6 | @end
7 |
8 | @implementation FrameAccessorTests
9 |
10 | - (void)testGetViewOrigin {
11 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
12 | CGPoint viewOrigin = view.viewOrigin;
13 | XCTAssertEqual(viewOrigin.x, 1);
14 | XCTAssertEqual(viewOrigin.y, 2);
15 | }
16 |
17 | - (void)testSetViewOrigin {
18 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
19 | view.viewOrigin = CGPointMake(10, 20);
20 | XCTAssertEqual(view.viewOrigin.x, 10);
21 | XCTAssertEqual(view.viewOrigin.y, 20);
22 | XCTAssertEqual(view.frame.origin.x, 10);
23 | XCTAssertEqual(view.frame.origin.y, 20);
24 | }
25 |
26 | - (void)testGetViewSize {
27 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
28 | CGSize viewSize = view.viewSize;
29 | XCTAssertEqual(viewSize.width, 3);
30 | XCTAssertEqual(viewSize.height, 4);
31 | }
32 |
33 | - (void)testSetViewSize {
34 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
35 | view.viewSize = CGSizeMake(30, 40);
36 | XCTAssertEqual(view.viewSize.width, 30);
37 | XCTAssertEqual(view.viewSize.height, 40);
38 | XCTAssertEqual(view.frame.size.width, 30);
39 | XCTAssertEqual(view.frame.size.height, 40);
40 | }
41 |
42 | - (void)testGetX {
43 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
44 | XCTAssertEqual(view.x, 1);
45 | }
46 |
47 | - (void)testSetX {
48 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
49 | view.x = 10;
50 | XCTAssertEqual(view.x, 10);
51 | XCTAssertEqual(view.frame.origin.x, 10);
52 | }
53 |
54 | - (void)testGetY {
55 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
56 | XCTAssertEqual(view.y, 2);
57 | }
58 |
59 | - (void)testSetY {
60 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
61 | view.y = 20;
62 | XCTAssertEqual(view.y, 20);
63 | XCTAssertEqual(view.frame.origin.y, 20);
64 | }
65 |
66 | - (void)testGetWidth {
67 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
68 | XCTAssertEqual(view.width, 3);
69 | }
70 |
71 | - (void)testSetWidth {
72 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
73 | view.width = 30;
74 | XCTAssertEqual(view.width, 30);
75 | XCTAssertEqual(view.frame.size.width, 30);
76 | }
77 |
78 | - (void)testGetHeight {
79 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
80 | XCTAssertEqual(view.height, 4);
81 | }
82 |
83 | - (void)testSetHeight {
84 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
85 | view.height = 40;
86 | XCTAssertEqual(view.height, 40);
87 | XCTAssertEqual(view.frame.size.height, 40);
88 | }
89 |
90 | - (void)testGetTop {
91 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
92 | XCTAssertEqual(view.top, 2);
93 | }
94 |
95 | - (void)testSetTop {
96 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
97 | view.top = 0;
98 | XCTAssertEqual(view.top, 0);
99 | XCTAssertEqual(CGRectGetMinY(view.frame), 0);
100 | }
101 |
102 | - (void)testGetLeft {
103 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
104 | XCTAssertEqual(view.left, 1);
105 | }
106 |
107 | - (void)testSetLeft {
108 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
109 | view.left = 0;
110 | XCTAssertEqual(view.left, 0);
111 | XCTAssertEqual(CGRectGetMinX(view.frame), 0);
112 | }
113 |
114 | - (void)testGetBottom {
115 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
116 | XCTAssertEqual(view.bottom, 6);
117 | }
118 |
119 | - (void)testSetBottom {
120 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
121 | view.bottom = 10;
122 | XCTAssertEqual(view.bottom, 10);
123 | XCTAssertEqual(CGRectGetMaxY(view.frame), 10);
124 | }
125 |
126 | - (void)testGetRight {
127 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
128 | XCTAssertEqual(view.right, 4);
129 | }
130 |
131 | - (void)testSetRight {
132 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
133 | view.right = 10;
134 | XCTAssertEqual(view.right, 10);
135 | XCTAssertEqual(CGRectGetMaxX(view.frame), 10);
136 | }
137 |
138 | - (void)testGetCenterX {
139 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
140 | XCTAssertEqual(view.centerX, 2.5);
141 | }
142 |
143 | - (void)testSetCenterX {
144 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
145 | view.centerX = 10;
146 | XCTAssertEqual(view.centerX, 10);
147 | XCTAssertEqual(CGRectGetMidX(view.frame), 10);
148 | }
149 |
150 | - (void)testGetCenterY {
151 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
152 | XCTAssertEqual(view.centerY, 4);
153 | }
154 |
155 | - (void)testSetCenter {
156 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
157 | view.centerY = 10;
158 | XCTAssertEqual(view.centerY, 10);
159 | XCTAssertEqual(CGRectGetMidY(view.frame), 10);
160 | }
161 |
162 | - (void)testGetMiddlePoint {
163 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
164 | XCTAssertEqual(view.middlePoint.x, 1.5);
165 | XCTAssertEqual(view.middlePoint.y, 2);
166 | }
167 |
168 | - (void)testGetMiddleX {
169 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
170 | XCTAssertEqual(view.middleX, 1.5);
171 | }
172 |
173 | - (void)testGetMiddleY {
174 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(1, 2, 3, 4)];
175 | XCTAssertEqual(view.middleY, 2);
176 | }
177 |
178 | - (void)testGetContentOffsetX {
179 | UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
180 | XCTAssertEqual(scrollView.contentOffsetX, 0);
181 | }
182 |
183 | - (void)testSetContentOffsetX {
184 | UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
185 | scrollView.contentOffsetX = 5;
186 | XCTAssertEqual(scrollView.contentOffsetX, 5);
187 | XCTAssertEqual(scrollView.contentOffset.x, 5);
188 | }
189 |
190 | - (void)testGetContentOffsetY {
191 | UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
192 | XCTAssertEqual(scrollView.contentOffsetY, 0);
193 | }
194 |
195 | - (void)testSetContentOffsetY {
196 | UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
197 | scrollView.contentOffsetY = 5;
198 | XCTAssertEqual(scrollView.contentOffsetY, 5);
199 | XCTAssertEqual(scrollView.contentOffset.y, 5);
200 | }
201 |
202 | - (void)testGetContentSizeWidth {
203 | UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
204 | XCTAssertEqual(scrollView.contentSizeWidth, 0);
205 | }
206 |
207 | - (void)testSetContentSizeWidth {
208 | UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
209 | scrollView.contentSizeWidth = 5;
210 | XCTAssertEqual(scrollView.contentSizeWidth, 5);
211 | XCTAssertEqual(scrollView.contentSize.width, 5);
212 | }
213 |
214 | - (void)testGetContentSizeHeight {
215 | UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
216 | XCTAssertEqual(scrollView.contentSizeWidth, 0);
217 | }
218 |
219 | - (void)testSetContentSizeHeight {
220 | UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
221 | scrollView.contentSizeHeight = 5;
222 | XCTAssertEqual(scrollView.contentSizeHeight, 5);
223 | XCTAssertEqual(scrollView.contentSize.height, 5);
224 | }
225 |
226 | - (void)testGetContentInsetTop {
227 | UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
228 | XCTAssertEqual(scrollView.contentInsetTop, 0);
229 | }
230 |
231 | - (void)testSetContentInsetTop {
232 | UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
233 | scrollView.contentInsetTop = 5;
234 | XCTAssertEqual(scrollView.contentInsetTop, 5);
235 | XCTAssertEqual(scrollView.contentInset.top, 5);
236 | }
237 |
238 | - (void)testGetContentInsetLeft {
239 | UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
240 | XCTAssertEqual(scrollView.contentInsetLeft, 0);
241 | }
242 |
243 | - (void)testSetContentInsetLeft {
244 | UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
245 | scrollView.contentInsetLeft = 5;
246 | XCTAssertEqual(scrollView.contentInsetLeft, 5);
247 | XCTAssertEqual(scrollView.contentInset.left, 5);
248 | }
249 |
250 | - (void)testGetContentInsetBottom {
251 | UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
252 | XCTAssertEqual(scrollView.contentInsetBottom, 0);
253 | }
254 |
255 | - (void)testSetContentInsetBottom {
256 | UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
257 | scrollView.contentInsetBottom = 5;
258 | XCTAssertEqual(scrollView.contentInsetBottom, 5);
259 | XCTAssertEqual(scrollView.contentInset.bottom, 5);
260 | }
261 |
262 | - (void)testGetContentInsetRight {
263 | UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
264 | XCTAssertEqual(scrollView.contentInsetRight, 0);
265 | }
266 |
267 | - (void)testSetContentInsetRight {
268 | UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
269 | scrollView.contentInsetRight = 5;
270 | XCTAssertEqual(scrollView.contentInsetRight, 5);
271 | XCTAssertEqual(scrollView.contentInset.right, 5);
272 | }
273 |
274 | @end
275 |
--------------------------------------------------------------------------------
/Examples/FrameAccessorTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.ayakanonaka.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Examples/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | gem 'slather'
4 |
--------------------------------------------------------------------------------
/Examples/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | activesupport (4.2.1)
5 | i18n (~> 0.7)
6 | json (~> 1.7, >= 1.7.7)
7 | minitest (~> 5.1)
8 | thread_safe (~> 0.3, >= 0.3.4)
9 | tzinfo (~> 1.1)
10 | clamp (0.6.4)
11 | colored (1.2)
12 | i18n (0.7.0)
13 | json (1.8.2)
14 | mini_portile (0.6.2)
15 | minitest (5.6.0)
16 | nokogiri (1.6.6.2)
17 | mini_portile (~> 0.6.0)
18 | slather (1.7.0)
19 | clamp (~> 0.6)
20 | nokogiri (~> 1.6.3)
21 | xcodeproj (~> 0.23.0)
22 | thread_safe (0.3.5)
23 | tzinfo (1.2.2)
24 | thread_safe (~> 0.1)
25 | xcodeproj (0.23.1)
26 | activesupport (>= 3)
27 | colored (~> 1.2)
28 |
29 | PLATFORMS
30 | ruby
31 |
32 | DEPENDENCIES
33 | slather
34 |
--------------------------------------------------------------------------------
/Examples/Podfile:
--------------------------------------------------------------------------------
1 | plugin 'slather'
2 | source 'https://github.com/CocoaPods/Specs.git'
3 | platform :ios, "4.3"
4 |
5 | target "FrameAccessor" do
6 | pod 'FrameAccessor', :path => '..'
7 | end
8 |
--------------------------------------------------------------------------------
/Examples/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - FrameAccessor (2.0)
3 |
4 | DEPENDENCIES:
5 | - FrameAccessor (from `..`)
6 |
7 | EXTERNAL SOURCES:
8 | FrameAccessor:
9 | :path: ".."
10 |
11 | SPEC CHECKSUMS:
12 | FrameAccessor: 443a13e58e23a10ff22180da0897b28c3f6abf66
13 |
14 | COCOAPODS: 0.36.4
15 |
--------------------------------------------------------------------------------
/FrameAccessor.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'FrameAccessor'
3 | s.version = '2.0'
4 | s.license = 'MIT'
5 | s.summary = 'Easy access to view\'s frame.'
6 | s.homepage = 'https://github.com/AlexDenisov/FrameAccessor'
7 | s.description = %{
8 | You can access x, y, width, height, origin or size like properties.
9 | Like this:
10 | view.x = 15;
11 | view.width = 167;
12 | }
13 | s.author = {
14 | "AlexDenisov" => "1101.debian@gmail.com",
15 | "holgersindbaek" => "holgersindbaek@gmail.com",
16 | "noxt" => "id.noxt@gmail.com"
17 | }
18 | s.source = { :git => 'https://github.com/AlexDenisov/FrameAccessor.git', :tag => s.version.to_s}
19 | s.ios.deployment_target = '4.3'
20 | s.osx.deployment_target = '10.6'
21 | s.ios.source_files = 'FrameAccessor/*.{h,m}'
22 | s.osx.source_files = 'FrameAccessor/FrameAccessor.h', 'FrameAccessor/ViewFrameAccessor.{h,m}'
23 | end
24 |
--------------------------------------------------------------------------------
/FrameAccessor/FrameAccessor.h:
--------------------------------------------------------------------------------
1 | //
2 | // FrameAccessor.h
3 | // FrameAccessor
4 | //
5 | // Created by Alex Denisov on 18.03.12.
6 | // Copyright (c) 2013 okolodev.org. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #if (TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE)
12 | #import
13 | #endif
14 |
--------------------------------------------------------------------------------
/FrameAccessor/ScrollViewFrameAccessor.h:
--------------------------------------------------------------------------------
1 | //
2 | // ScrollViewFrameAccessor.h
3 | // ScrollViewFrameAccessor
4 | //
5 | // Created by Ivanenko Dmitry on 28.10.13.
6 | // Copyright (c) 2013 Artox Lab. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | @interface UIScrollView (FrameAccessor)
13 |
14 | // Content Offset
15 | @property (nonatomic) CGFloat contentOffsetX;
16 | @property (nonatomic) CGFloat contentOffsetY;
17 |
18 | // Content Size
19 | @property (nonatomic) CGFloat contentSizeWidth;
20 | @property (nonatomic) CGFloat contentSizeHeight;
21 |
22 | // Content Inset
23 | @property (nonatomic) CGFloat contentInsetTop;
24 | @property (nonatomic) CGFloat contentInsetLeft;
25 | @property (nonatomic) CGFloat contentInsetBottom;
26 | @property (nonatomic) CGFloat contentInsetRight;
27 |
28 | @end
--------------------------------------------------------------------------------
/FrameAccessor/ScrollViewFrameAccessor.m:
--------------------------------------------------------------------------------
1 | //
2 | // ScrollViewFrameAccessor.m
3 | // ScrollViewFrameAccessor
4 | //
5 | // Created by Ivanenko Dmitry on 28.10.13.
6 | // Copyright (c) 2013 Artox Lab. All rights reserved.
7 | //
8 |
9 | #import "ScrollViewFrameAccessor.h"
10 |
11 |
12 | @implementation UIScrollView (FrameAccessor)
13 |
14 | #pragma mark Content Offset
15 |
16 | - (CGFloat)contentOffsetX
17 | {
18 | return self.contentOffset.x;
19 | }
20 |
21 | - (CGFloat)contentOffsetY
22 | {
23 | return self.contentOffset.y;
24 | }
25 |
26 | - (void)setContentOffsetX:(CGFloat)newContentOffsetX
27 | {
28 | self.contentOffset = CGPointMake(newContentOffsetX, self.contentOffsetY);
29 | }
30 |
31 | - (void)setContentOffsetY:(CGFloat)newContentOffsetY
32 | {
33 | self.contentOffset = CGPointMake(self.contentOffsetX, newContentOffsetY);
34 | }
35 |
36 |
37 | #pragma mark Content Size
38 |
39 | - (CGFloat)contentSizeWidth
40 | {
41 | return self.contentSize.width;
42 | }
43 |
44 | - (CGFloat)contentSizeHeight
45 | {
46 | return self.contentSize.height;
47 | }
48 |
49 | - (void)setContentSizeWidth:(CGFloat)newContentSizeWidth
50 | {
51 | self.contentSize = CGSizeMake(newContentSizeWidth, self.contentSizeHeight);
52 | }
53 |
54 | - (void)setContentSizeHeight:(CGFloat)newContentSizeHeight
55 | {
56 | self.contentSize = CGSizeMake(self.contentSizeWidth, newContentSizeHeight);
57 | }
58 |
59 |
60 | #pragma mark Content Inset
61 |
62 | - (CGFloat)contentInsetTop
63 | {
64 | return self.contentInset.top;
65 | }
66 |
67 | - (CGFloat)contentInsetRight
68 | {
69 | return self.contentInset.right;
70 | }
71 |
72 | - (CGFloat)contentInsetBottom
73 | {
74 | return self.contentInset.bottom;
75 | }
76 |
77 | - (CGFloat)contentInsetLeft
78 | {
79 | return self.contentInset.left;
80 | }
81 |
82 | - (void)setContentInsetTop:(CGFloat)newContentInsetTop
83 | {
84 | UIEdgeInsets newContentInset = self.contentInset;
85 | newContentInset.top = newContentInsetTop;
86 | self.contentInset = newContentInset;
87 | }
88 |
89 | - (void)setContentInsetRight:(CGFloat)newContentInsetRight
90 | {
91 | UIEdgeInsets newContentInset = self.contentInset;
92 | newContentInset.right = newContentInsetRight;
93 | self.contentInset = newContentInset;
94 | }
95 |
96 | - (void)setContentInsetBottom:(CGFloat)newContentInsetBottom
97 | {
98 | UIEdgeInsets newContentInset = self.contentInset;
99 | newContentInset.bottom = newContentInsetBottom;
100 | self.contentInset = newContentInset;
101 | }
102 |
103 | - (void)setContentInsetLeft:(CGFloat)newContentInsetLeft
104 | {
105 | UIEdgeInsets newContentInset = self.contentInset;
106 | newContentInset.left = newContentInsetLeft;
107 | self.contentInset = newContentInset;
108 | }
109 |
110 | @end
--------------------------------------------------------------------------------
/FrameAccessor/ViewFrameAccessor.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewFrameAccessor.h
3 | // ViewFrameAccessor
4 | //
5 | // Created by Alex Denisov on 18.03.12.
6 | // Copyright (c) 2013 okolodev.org. All rights reserved.
7 | //
8 |
9 |
10 | #define IS_IOS_DEVICE (TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE)
11 |
12 | #if IS_IOS_DEVICE
13 | #import
14 | #define View UIView
15 | #else
16 | #import
17 | #define View NSView
18 | #endif
19 |
20 |
21 | @interface View (FrameAccessor)
22 |
23 | // Frame
24 | @property (nonatomic) CGPoint viewOrigin;
25 | @property (nonatomic) CGSize viewSize;
26 |
27 | // Frame Origin
28 | @property (nonatomic) CGFloat x;
29 | @property (nonatomic) CGFloat y;
30 |
31 | // Frame Size
32 | @property (nonatomic) CGFloat width;
33 | @property (nonatomic) CGFloat height;
34 |
35 | // Frame Borders
36 | @property (nonatomic) CGFloat top;
37 | @property (nonatomic) CGFloat left;
38 | @property (nonatomic) CGFloat bottom;
39 | @property (nonatomic) CGFloat right;
40 |
41 | // Center Point
42 | #if !IS_IOS_DEVICE
43 | @property (nonatomic) CGPoint center;
44 | #endif
45 | @property (nonatomic) CGFloat centerX;
46 | @property (nonatomic) CGFloat centerY;
47 |
48 | // Middle Point
49 | @property (nonatomic, readonly) CGPoint middlePoint;
50 | @property (nonatomic, readonly) CGFloat middleX;
51 | @property (nonatomic, readonly) CGFloat middleY;
52 |
53 | @end
--------------------------------------------------------------------------------
/FrameAccessor/ViewFrameAccessor.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewFrameAccessor.m
3 | // ViewFrameAccessor
4 | //
5 | // Created by Alex Denisov on 18.03.12.
6 | // Copyright (c) 2013 okolodev.org. All rights reserved.
7 | //
8 |
9 | #import "ViewFrameAccessor.h"
10 |
11 |
12 | @implementation View (FrameAccessor)
13 |
14 | #pragma mark Frame
15 |
16 | - (CGPoint)viewOrigin
17 | {
18 | return self.frame.origin;
19 | }
20 |
21 | - (void)setViewOrigin:(CGPoint)newOrigin
22 | {
23 | CGRect newFrame = self.frame;
24 | newFrame.origin = newOrigin;
25 | self.frame = newFrame;
26 | }
27 |
28 | - (CGSize)viewSize
29 | {
30 | return self.frame.size;
31 | }
32 |
33 | - (void)setViewSize:(CGSize)newSize
34 | {
35 | CGRect newFrame = self.frame;
36 | newFrame.size = newSize;
37 | self.frame = newFrame;
38 | }
39 |
40 |
41 | #pragma mark Frame Origin
42 |
43 | - (CGFloat)x
44 | {
45 | return self.frame.origin.x;
46 | }
47 |
48 | - (void)setX:(CGFloat)newX
49 | {
50 | CGRect newFrame = self.frame;
51 | newFrame.origin.x = newX;
52 | self.frame = newFrame;
53 | }
54 |
55 | - (CGFloat)y
56 | {
57 | return self.frame.origin.y;
58 | }
59 |
60 | - (void)setY:(CGFloat)newY
61 | {
62 | CGRect newFrame = self.frame;
63 | newFrame.origin.y = newY;
64 | self.frame = newFrame;
65 | }
66 |
67 |
68 | #pragma mark Frame Size
69 |
70 | - (CGFloat)height
71 | {
72 | return self.frame.size.height;
73 | }
74 |
75 | - (void)setHeight:(CGFloat)newHeight
76 | {
77 | CGRect newFrame = self.frame;
78 | newFrame.size.height = newHeight;
79 | self.frame = newFrame;
80 | }
81 |
82 | - (CGFloat)width
83 | {
84 | return self.frame.size.width;
85 | }
86 |
87 | - (void)setWidth:(CGFloat)newWidth
88 | {
89 | CGRect newFrame = self.frame;
90 | newFrame.size.width = newWidth;
91 | self.frame = newFrame;
92 | }
93 |
94 |
95 | #pragma mark Frame Borders
96 |
97 | - (CGFloat)left
98 | {
99 | return self.x;
100 | }
101 |
102 | - (void)setLeft:(CGFloat)left
103 | {
104 | self.x = left;
105 | }
106 |
107 | - (CGFloat)right
108 | {
109 | return self.frame.origin.x + self.frame.size.width;
110 | }
111 |
112 | - (void)setRight:(CGFloat)right
113 | {
114 | self.x = right - self.width;
115 | }
116 |
117 | - (CGFloat)top
118 | {
119 | return self.y;
120 | }
121 |
122 | - (void)setTop:(CGFloat)top
123 | {
124 | self.y = top;
125 | }
126 |
127 | - (CGFloat)bottom
128 | {
129 | return self.frame.origin.y + self.frame.size.height;
130 | }
131 |
132 | - (void)setBottom:(CGFloat)bottom
133 | {
134 | self.y = bottom - self.height;
135 | }
136 |
137 |
138 | #pragma mark Center Point
139 |
140 | #if !IS_IOS_DEVICE
141 | - (CGPoint)center
142 | {
143 | return CGPointMake(self.left + self.middleX, self.top + self.middleY);
144 | }
145 |
146 | - (void)setCenter:(CGPoint)newCenter
147 | {
148 | self.left = newCenter.x - self.middleX;
149 | self.top = newCenter.y - self.middleY;
150 | }
151 | #endif
152 |
153 | - (CGFloat)centerX
154 | {
155 | return self.center.x;
156 | }
157 |
158 | - (void)setCenterX:(CGFloat)newCenterX
159 | {
160 | self.center = CGPointMake(newCenterX, self.center.y);
161 | }
162 |
163 | - (CGFloat)centerY
164 | {
165 | return self.center.y;
166 | }
167 |
168 | - (void)setCenterY:(CGFloat)newCenterY
169 | {
170 | self.center = CGPointMake(self.center.x, newCenterY);
171 | }
172 |
173 |
174 | #pragma mark Middle Point
175 |
176 | - (CGPoint)middlePoint
177 | {
178 | return CGPointMake(self.middleX, self.middleY);
179 | }
180 |
181 | - (CGFloat)middleX
182 | {
183 | return self.width / 2;
184 | }
185 |
186 | - (CGFloat)middleY
187 | {
188 | return self.height / 2;
189 | }
190 |
191 | @end
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 Alexey Denisov
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # FrameAccessor
2 |
3 | [](https://travis-ci.org/AlexDenisov/FrameAccessor)
4 | [](https://coveralls.io/r/AlexDenisov/FrameAccessor?branch=master)
5 |
6 | Easy way to access view's frame in iOS and OSX.
7 |
8 | ## Compatibility
9 |
10 | * iOS 4.3 or higher
11 | * OSX 10.6 or higher
12 |
13 | ## Installation
14 |
15 | ### Manual Install (preferred method)
16 |
17 | Download framework for [iOS](https://github.com/AlexDenisov/FrameAccessor/releases/download/2.0/FrameAccessor-iOS-2.0.zip) or for [OS X](https://github.com/AlexDenisov/FrameAccessor/releases/download/2.0/FrameAccessor-OSX-2.0.zip) target and drag'n'drop into your project.
18 |
19 | Add `-ObjC -all_load` to Other Linker Flags.
20 |
21 | ### CocoaPods
22 |
23 | Edit your Podfile and add `FrameAccessor`:
24 |
25 | ``` bash
26 | pod 'FrameAccessor'
27 | ```
28 |
29 | ## Example Usage
30 |
31 | ```objective-c
32 | view.x = 15.;
33 | view.width = 167.;
34 | ```
35 | instead of
36 | ```objective-c
37 | CGRect newFrame = view.frame;
38 | newFrame.origin.x = 15.;
39 | newFrame.size.width = 167.;
40 | view.frame = newFrame;
41 | ```
42 |
43 | ## Available Properties
44 |
45 | `UIView/NSView` properties:
46 |
47 | Property | Type | Аvailability
48 | --- | --- | ---
49 | `viewOrigin` | `CGPoint` | *readwrite*
50 | `viewSize` | `CGSize` | *readwrite*
51 | `x`, `y` | `CGFloat` | *readwrite*
52 | `width`, `height` | `CGFloat` | *readwrite*
53 | `top`, `left`, `bottom`, `right` | `CGFloat` | *readwrite*
54 | `centerX`, `centerY` | `CGFloat` | *readwrite*
55 | `middlePoint` | `CGPoint` | **readonly**
56 | `middleX`, `middleY` | `CGFloat` | **readonly**
57 |
58 | __Note:__ the names of @viewOrigin and @viewSize properties are prefixed with `view` to not create conflicts with Apple's private internals (As discussed in [#7](https://github.com/AlexDenisov/FrameAccessor/issues/7)).
59 |
60 |
61 | `UIScrollView` properties:
62 |
63 | Property | Type | Аvailability
64 | --- | --- | ---
65 | `contentOffsetX`, `contentOffsetY` | `CGFloat` | *readwrite*
66 | `contentSizeWidth`, `contentSizeHeight` | `CGFloat` | *readwrite*
67 | `contentInsetTop`, `contentInsetLeft`,
`contentInsetBottom`, `contentInsetRight` | `CGFloat` | *readwrite*
68 |
69 | ## License
70 |
71 | FrameAccessor is available under the MIT license.
72 |
73 | Copyright (c) 2012 Alexey Denisov
74 |
75 | 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:
76 |
77 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
78 |
79 | 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.
80 |
81 |
82 |
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AlexDenisov/FrameAccessor/31ba3ef033be9d555a3eac315fa885a08a061636/screenshot.png
--------------------------------------------------------------------------------