├── SplittingTriangle ├── en.lproj │ └── InfoPlist.strings ├── ViewController.h ├── AppDelegate.h ├── main.m ├── SplittingTriangle-Prefix.pch ├── essence │ ├── SplittingTriangle.h │ └── SplittingTriangle.m ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── ViewController.m ├── SplittingTriangle-Info.plist ├── Base.lproj │ ├── Main_iPad.storyboard │ └── Main_iPhone.storyboard └── AppDelegate.m ├── SplittingTriangle.gif ├── SplittingTriangle.png ├── SplittingTriangleTests ├── en.lproj │ └── InfoPlist.strings ├── SplittingTriangleTests-Info.plist └── SplittingTriangleTests.m ├── SplittingTriangle.xcodeproj ├── xcuserdata │ ├── iaomw.xcuserdatad │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ └── SplittingTriangle.xcscheme │ └── nuzan-1.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── SplittingTriangle.xcscheme ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ ├── iaomw.xcuserdatad │ │ │ ├── UserInterfaceState.xcuserstate │ │ │ └── WorkspaceSettings.xcsettings │ │ └── nuzan-1.xcuserdatad │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── SplittingTriangle.xccheckout └── project.pbxproj ├── .gitignore ├── SplittingTriangle.podspec ├── README.md └── LICENSE.md /SplittingTriangle/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /SplittingTriangle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iaomw/SplittingTriangle/HEAD/SplittingTriangle.gif -------------------------------------------------------------------------------- /SplittingTriangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iaomw/SplittingTriangle/HEAD/SplittingTriangle.png -------------------------------------------------------------------------------- /SplittingTriangleTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /SplittingTriangle.xcodeproj/xcuserdata/iaomw.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /SplittingTriangle.xcodeproj/xcuserdata/nuzan-1.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /SplittingTriangle.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SplittingTriangle.xcodeproj/project.xcworkspace/xcuserdata/iaomw.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iaomw/SplittingTriangle/HEAD/SplittingTriangle.xcodeproj/project.xcworkspace/xcuserdata/iaomw.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SplittingTriangle/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // SplittingTriangle 4 | // 5 | // Created by Sandy Lee on 9/1/14. 6 | // Copyright (c) 2014 iaomw. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SplittingTriangle/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // SplittingTriangle 4 | // 5 | // Created by Sandy Lee on 9/1/14. 6 | // Copyright (c) 2014 iaomw. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /SplittingTriangle/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // SplittingTriangle 4 | // 5 | // Created by Sandy Lee on 9/1/14. 6 | // Copyright (c) 2014 iaomw. 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 | -------------------------------------------------------------------------------- /SplittingTriangle/SplittingTriangle-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /SplittingTriangle.xcodeproj/project.xcworkspace/xcuserdata/iaomw.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /SplittingTriangle.xcodeproj/project.xcworkspace/xcuserdata/nuzan-1.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 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 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | # Pods/ 27 | -------------------------------------------------------------------------------- /SplittingTriangle.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | 3 | s.name = 'SplittingTriangle' 4 | s.version = '1.11' 5 | s.summary = 'A simple loading style animation.' 6 | s.homepage = 'https://github.com/iaomw/SplittingTriangle' 7 | s.license = 'MIT' 8 | 9 | s.author = { 'Sandy Lee' => 'iaomw@live.com' } 10 | 11 | s.source = { :git => 'https://github.com/iaomw/SplittingTriangle.git', :tag => s.version.to_s } 12 | 13 | s.requires_arc = true 14 | s.platform = :ios, '7.0' 15 | s.source_files = 'SplittingTriangle/essence/*.{h,m}' 16 | s.frameworks = 'QuartzCore', 'CoreGraphics' 17 | 18 | end 19 | -------------------------------------------------------------------------------- /SplittingTriangle/essence/SplittingTriangle.h: -------------------------------------------------------------------------------- 1 | // 2 | // SplittingTriangle.h 3 | // SplittingTriangle 4 | // 5 | // Created by Sandy Lee on 9/1/14. 6 | // Copyright (c) 2014 iaomw. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SplittingTriangle : UIView 12 | 13 | @property(getter=isPaused, nonatomic) BOOL paused; 14 | 15 | @property (assign, nonatomic) CGFloat duration; 16 | @property (assign, nonatomic) BOOL clockwise; 17 | 18 | // radius of the circle containing the central triangle 19 | 20 | @property (assign, nonatomic) CGFloat radius; 21 | 22 | - (void)setForeColor:(UIColor *)foreColor andBackColor:(UIColor*)backColor; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /SplittingTriangle.xcodeproj/xcuserdata/iaomw.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SplittingTriangle.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | C328D10119B44A6D0042516B 16 | 17 | primary 18 | 19 | 20 | C328D12519B44A6D0042516B 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /SplittingTriangle.xcodeproj/xcuserdata/nuzan-1.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SplittingTriangle.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | C328D10119B44A6D0042516B 16 | 17 | primary 18 | 19 | 20 | C328D12519B44A6D0042516B 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | SplittingTriangle 2 | ================= 3 | 4 | iOS port of [Splitting triangle](https://dribbble.com/shots/1678788-Splitting-triangle). 5 | 6 | 7 | 8 | ## Installation 9 | 10 | Add the `SplittingTriangle.h` and `SplittingTriangle.m` source files to your project. 11 | 12 | ## Usage 13 | 14 | ``` objective-c 15 | 16 | SplittingTriangle *st = [[SplittingTriangle alloc] initWithFrame:CGRectMake(0, 0, 300, 300)]; 17 | 18 | [st setForeColor:[UIColor colorWithWhite:0.7 alpha:0.7] andBackColor:[UIColor clearColor]]; 19 | 20 | [st setClockwise:YES]; 21 | [st setDuration:2.4]; 22 | [st setRadius:22]; 23 | [st setPaused:NO]; 24 | 25 | [self.view addSubview:st]; 26 | 27 | ``` 28 | 29 | ## License 30 | 31 | [MIT license](LICENSE.md). 32 | -------------------------------------------------------------------------------- /SplittingTriangleTests/SplittingTriangleTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | me.iaomw.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /SplittingTriangleTests/SplittingTriangleTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // SplittingTriangleTests.m 3 | // SplittingTriangleTests 4 | // 5 | // Created by Sandy Lee on 9/1/14. 6 | // Copyright (c) 2014 iaomw. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SplittingTriangleTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation SplittingTriangleTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014, Sandy Lee 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /SplittingTriangle/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "60x60", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "29x29", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "40x40", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "76x76", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /SplittingTriangle/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /SplittingTriangle/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // SplittingTriangle 4 | // 5 | // Created by Sandy Lee on 9/1/14. 6 | // Copyright (c) 2014 iaomw. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | #import "SplittingTriangle.h" 12 | 13 | @interface ViewController () 14 | 15 | @property IBOutlet UISwitch *liveSwitch; 16 | @property IBOutlet UISlider *durationSlider; 17 | @property IBOutlet UISwitch *directionSwitch; 18 | 19 | @property (strong, nonatomic) SplittingTriangle *st; 20 | 21 | @end 22 | 23 | @implementation ViewController 24 | 25 | - (void)viewDidLoad 26 | { 27 | [super viewDidLoad]; 28 | 29 | [self.view setBackgroundColor:[UIColor colorWithWhite:238.0/255 alpha:1]]; 30 | 31 | self.st = [[SplittingTriangle alloc] initWithFrame:CGRectMake(0, 0, 300, 300)]; 32 | 33 | [self.st setForeColor:[UIColor colorWithRed:25.0/255 green:191.0/255 blue:214.0/255 alpha:1] 34 | andBackColor:[UIColor clearColor]]; 35 | 36 | [self.st setDuration:2.4]; 37 | [self.st setRadius:22]; 38 | 39 | [self.st setPaused:NO]; 40 | 41 | [self.st setCenter:self.view.center]; 42 | 43 | [self.view addSubview:self.st]; 44 | } 45 | 46 | - (IBAction)durationChanged:(UISlider*)sender { 47 | 48 | [self.st setDuration:sender.value]; 49 | } 50 | 51 | - (IBAction)directionChanged:(UISwitch*)sender { 52 | 53 | [self.st setClockwise:sender.on]; 54 | } 55 | 56 | - (IBAction)liveChange:(UISwitch*)sender { 57 | 58 | [self.st setPaused:!sender.on]; 59 | } 60 | 61 | - (void)didReceiveMemoryWarning 62 | { 63 | [super didReceiveMemoryWarning]; 64 | // Dispose of any resources that can be recreated. 65 | } 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /SplittingTriangle.xcodeproj/project.xcworkspace/xcshareddata/SplittingTriangle.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 7F1505A8-B8EE-4106-B62E-4318436D18AD 9 | IDESourceControlProjectName 10 | SplittingTriangle 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 45D5B22AA3D8CDEF87AE599CCD619CFF35686E5F 14 | https://github.com/iaomw/SplittingTriangle.git 15 | 16 | IDESourceControlProjectPath 17 | SplittingTriangle.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 45D5B22AA3D8CDEF87AE599CCD619CFF35686E5F 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/iaomw/SplittingTriangle.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 45D5B22AA3D8CDEF87AE599CCD619CFF35686E5F 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 45D5B22AA3D8CDEF87AE599CCD619CFF35686E5F 36 | IDESourceControlWCCName 37 | SplittingTriangle 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /SplittingTriangle/SplittingTriangle-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | me.iaomw.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main_iPhone 29 | UIMainStoryboardFile~ipad 30 | Main_iPad 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /SplittingTriangle/Base.lproj/Main_iPad.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /SplittingTriangle/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // SplittingTriangle 4 | // 5 | // Created by Sandy Lee on 9/1/14. 6 | // Copyright (c) 2014 iaomw. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /SplittingTriangle.xcodeproj/xcuserdata/nuzan-1.xcuserdatad/xcschemes/SplittingTriangle.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /SplittingTriangle.xcodeproj/xcuserdata/iaomw.xcuserdatad/xcschemes/SplittingTriangle.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 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /SplittingTriangle/Base.lproj/Main_iPhone.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /SplittingTriangle/essence/SplittingTriangle.m: -------------------------------------------------------------------------------- 1 | // 2 | // SplittingTriangle.m 3 | // SplittingTriangle 4 | // 5 | // Created by Sandy Lee on 9/1/14. 6 | // Copyright (c) 2014 iaomw. All rights reserved. 7 | // 8 | 9 | #import "SplittingTriangle.h" 10 | 11 | @interface SplittingTriangle () 12 | 13 | @property (nonatomic, strong) CADisplayLink *displayLink; 14 | 15 | @property (nonatomic, assign) CGFloat rotateAngle; 16 | @property (nonatomic, assign) CGFloat rotateDelta; 17 | 18 | @property (nonatomic, assign) BOOL clockwising; 19 | 20 | @property (strong, nonatomic) UIColor *foreColor; 21 | 22 | @property (nonatomic, assign) CGFloat ratio; 23 | 24 | @end 25 | 26 | @implementation SplittingTriangle 27 | 28 | - (id)initWithFrame:(CGRect)frame 29 | { 30 | self = [super initWithFrame:frame]; 31 | 32 | if (self) {} 33 | 34 | return self; 35 | } 36 | 37 | - (void)setForeColor:(UIColor *)foreColor andBackColor:(UIColor*)backColor { 38 | 39 | self.foreColor = foreColor; 40 | 41 | self.backgroundColor = backColor; 42 | } 43 | 44 | # pragma mark - Getter&Setter 45 | 46 | - (void)setPaused:(BOOL)paused { 47 | 48 | [self.displayLink setPaused:paused]; 49 | } 50 | 51 | - (CADisplayLink*)displayLink { 52 | 53 | if (!_displayLink) { 54 | 55 | _displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(update:)]; 56 | 57 | [_displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode]; 58 | } 59 | 60 | return _displayLink; 61 | } 62 | 63 | - (CGFloat)duration { 64 | 65 | if (!_duration) { 66 | 67 | return 2.2; 68 | } 69 | 70 | return _duration; 71 | } 72 | 73 | - (UIColor*)foreColor { 74 | 75 | if (!_foreColor) { 76 | 77 | _foreColor = [UIColor whiteColor]; 78 | } 79 | 80 | return _foreColor; 81 | } 82 | 83 | - (CGFloat)radius { 84 | 85 | if (!_radius) { 86 | 87 | _radius = 32; 88 | } 89 | 90 | return _radius; 91 | } 92 | 93 | - (CGFloat)ratio { 94 | 95 | if (!_ratio) { 96 | 97 | _ratio = CGFLOAT_MIN; 98 | 99 | _clockwising = _clockwise; 100 | } 101 | 102 | return _ratio; 103 | } 104 | 105 | # pragma mark - Animation 106 | 107 | - (void)update:(CADisplayLink *)displayLink 108 | { 109 | NSTimeInterval duration = displayLink.duration; 110 | 111 | self.rotateDelta = (M_PI/3)/(self.duration/duration); 112 | self.rotateAngle += _clockwising?_rotateDelta:-_rotateDelta; 113 | 114 | CGFloat ratio = fmod(fabs(self.rotateAngle), M_PI/3)/(M_PI/3); 115 | 116 | if (self.ratio>ratio) { 117 | 118 | self.ratio = ratio; 119 | 120 | self.rotateDelta = 0; 121 | self.rotateAngle = 0; 122 | 123 | _clockwising = _clockwise; 124 | 125 | } else { 126 | 127 | self.ratio = ratio; 128 | 129 | [self setNeedsDisplay]; 130 | } 131 | } 132 | 133 | - (void)drawRect:(CGRect)rect{ 134 | 135 | CGFloat width = rect.size.width; 136 | CGFloat height = rect.size.height; 137 | 138 | CGPoint center = CGPointMake(width/2, height/2); 139 | 140 | CGContextRef contextRef = UIGraphicsGetCurrentContext(); 141 | 142 | CGContextSaveGState(contextRef); 143 | CGContextClearRect(contextRef, rect); 144 | 145 | CGContextSetAllowsAntialiasing(contextRef, YES); 146 | CGContextSetShouldAntialias(contextRef, YES); 147 | 148 | CGMutablePathRef originPath = CGPathCreateMutable(); 149 | 150 | CGFloat cRadius = self.radius*(1+self.ratio); 151 | 152 | CGPoint points[3]; 153 | 154 | for (int i=0; i<3; i++) { 155 | 156 | CGFloat angle = M_PI/2+i*M_PI*2/3; 157 | 158 | CGSize delta = CGSizeMake(cos(angle)*cRadius, sin(angle)*cRadius); 159 | 160 | points[i] = CGPointMake(center.x+delta.width, center.y+delta.height); 161 | } 162 | 163 | CGPathAddLines(originPath, nil, points, 3); 164 | 165 | CGPathRef centerPath = createPathRotatedAroundCenter(originPath, center, self.rotateAngle); 166 | 167 | CGContextAddPath(contextRef, centerPath); 168 | 169 | cRadius*=(1+self.ratio); 170 | 171 | for (int i=0; i<3; i++) { 172 | 173 | CGFloat angle = M_PI/6 + i*M_PI*2/3 + self.rotateAngle; 174 | 175 | CGAffineTransform transform = CGAffineTransformIdentity; 176 | CGSize delta = CGSizeMake(cos(angle)*cRadius,sin(angle)*cRadius); 177 | transform = CGAffineTransformTranslate(transform, delta.width, delta.height); 178 | 179 | CGPathRef rotated = createPathRotatedAroundCenter(centerPath, center, angle+M_PI/6-self.rotateAngle); 180 | CGPathRef scaled = createPathScaledAroundCenter(rotated, center, 1-self.ratio); 181 | CGPathRef transformed = CGPathCreateCopyByTransformingPath(scaled, &transform); 182 | 183 | CGContextAddPath(contextRef, transformed); 184 | 185 | CGPathRelease(scaled); 186 | CGPathRelease(rotated); 187 | CGPathRelease(transformed); 188 | } 189 | 190 | CGPathRelease(originPath); 191 | CGPathRelease(centerPath); 192 | 193 | [self.foreColor setFill]; 194 | 195 | CGContextFillPath(contextRef); 196 | CGContextRestoreGState(contextRef); 197 | } 198 | 199 | //http://stackoverflow.com/questions/13738364/rotate-cgpath-without-changing-its-position 200 | 201 | static CGPathRef createPathRotatedAroundCenter(CGPathRef path, CGPoint center, CGFloat radians) { 202 | 203 | CGAffineTransform transform = CGAffineTransformIdentity; 204 | 205 | transform = CGAffineTransformTranslate(transform, center.x, center.y); 206 | transform = CGAffineTransformRotate(transform, radians); 207 | transform = CGAffineTransformTranslate(transform, -center.x, -center.y); 208 | 209 | return CGPathCreateCopyByTransformingPath(path, &transform); 210 | } 211 | 212 | static CGPathRef createPathScaledAroundCenter(CGPathRef path, CGPoint center, CGFloat ratio) { 213 | 214 | CGAffineTransform transform = CGAffineTransformIdentity; 215 | 216 | transform = CGAffineTransformTranslate(transform, center.x, center.y); 217 | transform = CGAffineTransformScale(transform, ratio, ratio); 218 | transform = CGAffineTransformTranslate(transform, -center.x, -center.y); 219 | 220 | return CGPathCreateCopyByTransformingPath(path, &transform); 221 | } 222 | 223 | @end 224 | -------------------------------------------------------------------------------- /SplittingTriangle.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 577B5E7E1A18A8DA007D099B /* SplittingTriangle.m in Sources */ = {isa = PBXBuildFile; fileRef = 577B5E7D1A18A8DA007D099B /* SplittingTriangle.m */; }; 11 | C328D10619B44A6D0042516B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C328D10519B44A6D0042516B /* Foundation.framework */; }; 12 | C328D10A19B44A6D0042516B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C328D10919B44A6D0042516B /* UIKit.framework */; }; 13 | C328D11019B44A6D0042516B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C328D10E19B44A6D0042516B /* InfoPlist.strings */; }; 14 | C328D11219B44A6D0042516B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C328D11119B44A6D0042516B /* main.m */; }; 15 | C328D11619B44A6D0042516B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C328D11519B44A6D0042516B /* AppDelegate.m */; }; 16 | C328D11919B44A6D0042516B /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C328D11719B44A6D0042516B /* Main_iPhone.storyboard */; }; 17 | C328D11C19B44A6D0042516B /* Main_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C328D11A19B44A6D0042516B /* Main_iPad.storyboard */; }; 18 | C328D11F19B44A6D0042516B /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C328D11E19B44A6D0042516B /* ViewController.m */; }; 19 | C328D12119B44A6D0042516B /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C328D12019B44A6D0042516B /* Images.xcassets */; }; 20 | C328D12819B44A6D0042516B /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C328D12719B44A6D0042516B /* XCTest.framework */; }; 21 | C328D12919B44A6D0042516B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C328D10519B44A6D0042516B /* Foundation.framework */; }; 22 | C328D12A19B44A6D0042516B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C328D10919B44A6D0042516B /* UIKit.framework */; }; 23 | C328D13219B44A6D0042516B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C328D13019B44A6D0042516B /* InfoPlist.strings */; }; 24 | C328D13419B44A6E0042516B /* SplittingTriangleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C328D13319B44A6E0042516B /* SplittingTriangleTests.m */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | C328D12B19B44A6D0042516B /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = C328D0FA19B44A6D0042516B /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = C328D10119B44A6D0042516B; 33 | remoteInfo = SplittingTriangle; 34 | }; 35 | /* End PBXContainerItemProxy section */ 36 | 37 | /* Begin PBXFileReference section */ 38 | 577B5E7C1A18A8DA007D099B /* SplittingTriangle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SplittingTriangle.h; sourceTree = ""; }; 39 | 577B5E7D1A18A8DA007D099B /* SplittingTriangle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SplittingTriangle.m; sourceTree = ""; }; 40 | C328D10219B44A6D0042516B /* SplittingTriangle.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SplittingTriangle.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | C328D10519B44A6D0042516B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 42 | C328D10719B44A6D0042516B /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 43 | C328D10919B44A6D0042516B /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 44 | C328D10D19B44A6D0042516B /* SplittingTriangle-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SplittingTriangle-Info.plist"; sourceTree = ""; }; 45 | C328D10F19B44A6D0042516B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 46 | C328D11119B44A6D0042516B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 47 | C328D11319B44A6D0042516B /* SplittingTriangle-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SplittingTriangle-Prefix.pch"; sourceTree = ""; }; 48 | C328D11419B44A6D0042516B /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 49 | C328D11519B44A6D0042516B /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 50 | C328D11819B44A6D0042516B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPhone.storyboard; sourceTree = ""; }; 51 | C328D11B19B44A6D0042516B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPad.storyboard; sourceTree = ""; }; 52 | C328D11D19B44A6D0042516B /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 53 | C328D11E19B44A6D0042516B /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 54 | C328D12019B44A6D0042516B /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 55 | C328D12619B44A6D0042516B /* SplittingTriangleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SplittingTriangleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | C328D12719B44A6D0042516B /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 57 | C328D12F19B44A6D0042516B /* SplittingTriangleTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SplittingTriangleTests-Info.plist"; sourceTree = ""; }; 58 | C328D13119B44A6D0042516B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 59 | C328D13319B44A6E0042516B /* SplittingTriangleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SplittingTriangleTests.m; sourceTree = ""; }; 60 | /* End PBXFileReference section */ 61 | 62 | /* Begin PBXFrameworksBuildPhase section */ 63 | C328D0FF19B44A6D0042516B /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | C328D10A19B44A6D0042516B /* UIKit.framework in Frameworks */, 68 | C328D10619B44A6D0042516B /* Foundation.framework in Frameworks */, 69 | ); 70 | runOnlyForDeploymentPostprocessing = 0; 71 | }; 72 | C328D12319B44A6D0042516B /* Frameworks */ = { 73 | isa = PBXFrameworksBuildPhase; 74 | buildActionMask = 2147483647; 75 | files = ( 76 | C328D12819B44A6D0042516B /* XCTest.framework in Frameworks */, 77 | C328D12A19B44A6D0042516B /* UIKit.framework in Frameworks */, 78 | C328D12919B44A6D0042516B /* Foundation.framework in Frameworks */, 79 | ); 80 | runOnlyForDeploymentPostprocessing = 0; 81 | }; 82 | /* End PBXFrameworksBuildPhase section */ 83 | 84 | /* Begin PBXGroup section */ 85 | 577B5E7B1A18A8DA007D099B /* essence */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | 577B5E7C1A18A8DA007D099B /* SplittingTriangle.h */, 89 | 577B5E7D1A18A8DA007D099B /* SplittingTriangle.m */, 90 | ); 91 | path = essence; 92 | sourceTree = ""; 93 | }; 94 | C328D0F919B44A6D0042516B = { 95 | isa = PBXGroup; 96 | children = ( 97 | C328D12D19B44A6D0042516B /* SplittingTriangleTests */, 98 | C328D10B19B44A6D0042516B /* SplittingTriangle */, 99 | C328D10419B44A6D0042516B /* Frameworks */, 100 | C328D10319B44A6D0042516B /* Products */, 101 | ); 102 | sourceTree = ""; 103 | }; 104 | C328D10319B44A6D0042516B /* Products */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | C328D10219B44A6D0042516B /* SplittingTriangle.app */, 108 | C328D12619B44A6D0042516B /* SplittingTriangleTests.xctest */, 109 | ); 110 | name = Products; 111 | sourceTree = ""; 112 | }; 113 | C328D10419B44A6D0042516B /* Frameworks */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | C328D10519B44A6D0042516B /* Foundation.framework */, 117 | C328D10719B44A6D0042516B /* CoreGraphics.framework */, 118 | C328D10919B44A6D0042516B /* UIKit.framework */, 119 | C328D12719B44A6D0042516B /* XCTest.framework */, 120 | ); 121 | name = Frameworks; 122 | sourceTree = ""; 123 | }; 124 | C328D10B19B44A6D0042516B /* SplittingTriangle */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | C328D11419B44A6D0042516B /* AppDelegate.h */, 128 | C328D11519B44A6D0042516B /* AppDelegate.m */, 129 | 577B5E7B1A18A8DA007D099B /* essence */, 130 | C328D11D19B44A6D0042516B /* ViewController.h */, 131 | C328D11E19B44A6D0042516B /* ViewController.m */, 132 | C328D10C19B44A6D0042516B /* Supporting Files */, 133 | ); 134 | path = SplittingTriangle; 135 | sourceTree = ""; 136 | }; 137 | C328D10C19B44A6D0042516B /* Supporting Files */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | C328D12019B44A6D0042516B /* Images.xcassets */, 141 | C328D11719B44A6D0042516B /* Main_iPhone.storyboard */, 142 | C328D11A19B44A6D0042516B /* Main_iPad.storyboard */, 143 | C328D10D19B44A6D0042516B /* SplittingTriangle-Info.plist */, 144 | C328D10E19B44A6D0042516B /* InfoPlist.strings */, 145 | C328D11119B44A6D0042516B /* main.m */, 146 | C328D11319B44A6D0042516B /* SplittingTriangle-Prefix.pch */, 147 | ); 148 | name = "Supporting Files"; 149 | sourceTree = ""; 150 | }; 151 | C328D12D19B44A6D0042516B /* SplittingTriangleTests */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | C328D13319B44A6E0042516B /* SplittingTriangleTests.m */, 155 | C328D12E19B44A6D0042516B /* Supporting Files */, 156 | ); 157 | path = SplittingTriangleTests; 158 | sourceTree = ""; 159 | }; 160 | C328D12E19B44A6D0042516B /* Supporting Files */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | C328D12F19B44A6D0042516B /* SplittingTriangleTests-Info.plist */, 164 | C328D13019B44A6D0042516B /* InfoPlist.strings */, 165 | ); 166 | name = "Supporting Files"; 167 | sourceTree = ""; 168 | }; 169 | /* End PBXGroup section */ 170 | 171 | /* Begin PBXNativeTarget section */ 172 | C328D10119B44A6D0042516B /* SplittingTriangle */ = { 173 | isa = PBXNativeTarget; 174 | buildConfigurationList = C328D13719B44A6E0042516B /* Build configuration list for PBXNativeTarget "SplittingTriangle" */; 175 | buildPhases = ( 176 | C328D0FE19B44A6D0042516B /* Sources */, 177 | C328D0FF19B44A6D0042516B /* Frameworks */, 178 | C328D10019B44A6D0042516B /* Resources */, 179 | ); 180 | buildRules = ( 181 | ); 182 | dependencies = ( 183 | ); 184 | name = SplittingTriangle; 185 | productName = SplittingTriangle; 186 | productReference = C328D10219B44A6D0042516B /* SplittingTriangle.app */; 187 | productType = "com.apple.product-type.application"; 188 | }; 189 | C328D12519B44A6D0042516B /* SplittingTriangleTests */ = { 190 | isa = PBXNativeTarget; 191 | buildConfigurationList = C328D13A19B44A6E0042516B /* Build configuration list for PBXNativeTarget "SplittingTriangleTests" */; 192 | buildPhases = ( 193 | C328D12219B44A6D0042516B /* Sources */, 194 | C328D12319B44A6D0042516B /* Frameworks */, 195 | C328D12419B44A6D0042516B /* Resources */, 196 | ); 197 | buildRules = ( 198 | ); 199 | dependencies = ( 200 | C328D12C19B44A6D0042516B /* PBXTargetDependency */, 201 | ); 202 | name = SplittingTriangleTests; 203 | productName = SplittingTriangleTests; 204 | productReference = C328D12619B44A6D0042516B /* SplittingTriangleTests.xctest */; 205 | productType = "com.apple.product-type.bundle.unit-test"; 206 | }; 207 | /* End PBXNativeTarget section */ 208 | 209 | /* Begin PBXProject section */ 210 | C328D0FA19B44A6D0042516B /* Project object */ = { 211 | isa = PBXProject; 212 | attributes = { 213 | LastUpgradeCheck = 0510; 214 | ORGANIZATIONNAME = iaomw; 215 | TargetAttributes = { 216 | C328D12519B44A6D0042516B = { 217 | TestTargetID = C328D10119B44A6D0042516B; 218 | }; 219 | }; 220 | }; 221 | buildConfigurationList = C328D0FD19B44A6D0042516B /* Build configuration list for PBXProject "SplittingTriangle" */; 222 | compatibilityVersion = "Xcode 3.2"; 223 | developmentRegion = English; 224 | hasScannedForEncodings = 0; 225 | knownRegions = ( 226 | en, 227 | Base, 228 | ); 229 | mainGroup = C328D0F919B44A6D0042516B; 230 | productRefGroup = C328D10319B44A6D0042516B /* Products */; 231 | projectDirPath = ""; 232 | projectRoot = ""; 233 | targets = ( 234 | C328D10119B44A6D0042516B /* SplittingTriangle */, 235 | C328D12519B44A6D0042516B /* SplittingTriangleTests */, 236 | ); 237 | }; 238 | /* End PBXProject section */ 239 | 240 | /* Begin PBXResourcesBuildPhase section */ 241 | C328D10019B44A6D0042516B /* Resources */ = { 242 | isa = PBXResourcesBuildPhase; 243 | buildActionMask = 2147483647; 244 | files = ( 245 | C328D11C19B44A6D0042516B /* Main_iPad.storyboard in Resources */, 246 | C328D12119B44A6D0042516B /* Images.xcassets in Resources */, 247 | C328D11919B44A6D0042516B /* Main_iPhone.storyboard in Resources */, 248 | C328D11019B44A6D0042516B /* InfoPlist.strings in Resources */, 249 | ); 250 | runOnlyForDeploymentPostprocessing = 0; 251 | }; 252 | C328D12419B44A6D0042516B /* Resources */ = { 253 | isa = PBXResourcesBuildPhase; 254 | buildActionMask = 2147483647; 255 | files = ( 256 | C328D13219B44A6D0042516B /* InfoPlist.strings in Resources */, 257 | ); 258 | runOnlyForDeploymentPostprocessing = 0; 259 | }; 260 | /* End PBXResourcesBuildPhase section */ 261 | 262 | /* Begin PBXSourcesBuildPhase section */ 263 | C328D0FE19B44A6D0042516B /* Sources */ = { 264 | isa = PBXSourcesBuildPhase; 265 | buildActionMask = 2147483647; 266 | files = ( 267 | C328D11F19B44A6D0042516B /* ViewController.m in Sources */, 268 | C328D11619B44A6D0042516B /* AppDelegate.m in Sources */, 269 | 577B5E7E1A18A8DA007D099B /* SplittingTriangle.m in Sources */, 270 | C328D11219B44A6D0042516B /* main.m in Sources */, 271 | ); 272 | runOnlyForDeploymentPostprocessing = 0; 273 | }; 274 | C328D12219B44A6D0042516B /* Sources */ = { 275 | isa = PBXSourcesBuildPhase; 276 | buildActionMask = 2147483647; 277 | files = ( 278 | C328D13419B44A6E0042516B /* SplittingTriangleTests.m in Sources */, 279 | ); 280 | runOnlyForDeploymentPostprocessing = 0; 281 | }; 282 | /* End PBXSourcesBuildPhase section */ 283 | 284 | /* Begin PBXTargetDependency section */ 285 | C328D12C19B44A6D0042516B /* PBXTargetDependency */ = { 286 | isa = PBXTargetDependency; 287 | target = C328D10119B44A6D0042516B /* SplittingTriangle */; 288 | targetProxy = C328D12B19B44A6D0042516B /* PBXContainerItemProxy */; 289 | }; 290 | /* End PBXTargetDependency section */ 291 | 292 | /* Begin PBXVariantGroup section */ 293 | C328D10E19B44A6D0042516B /* InfoPlist.strings */ = { 294 | isa = PBXVariantGroup; 295 | children = ( 296 | C328D10F19B44A6D0042516B /* en */, 297 | ); 298 | name = InfoPlist.strings; 299 | sourceTree = ""; 300 | }; 301 | C328D11719B44A6D0042516B /* Main_iPhone.storyboard */ = { 302 | isa = PBXVariantGroup; 303 | children = ( 304 | C328D11819B44A6D0042516B /* Base */, 305 | ); 306 | name = Main_iPhone.storyboard; 307 | sourceTree = ""; 308 | }; 309 | C328D11A19B44A6D0042516B /* Main_iPad.storyboard */ = { 310 | isa = PBXVariantGroup; 311 | children = ( 312 | C328D11B19B44A6D0042516B /* Base */, 313 | ); 314 | name = Main_iPad.storyboard; 315 | sourceTree = ""; 316 | }; 317 | C328D13019B44A6D0042516B /* InfoPlist.strings */ = { 318 | isa = PBXVariantGroup; 319 | children = ( 320 | C328D13119B44A6D0042516B /* en */, 321 | ); 322 | name = InfoPlist.strings; 323 | sourceTree = ""; 324 | }; 325 | /* End PBXVariantGroup section */ 326 | 327 | /* Begin XCBuildConfiguration section */ 328 | C328D13519B44A6E0042516B /* Debug */ = { 329 | isa = XCBuildConfiguration; 330 | buildSettings = { 331 | ALWAYS_SEARCH_USER_PATHS = NO; 332 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 333 | CLANG_CXX_LIBRARY = "libc++"; 334 | CLANG_ENABLE_MODULES = YES; 335 | CLANG_ENABLE_OBJC_ARC = YES; 336 | CLANG_WARN_BOOL_CONVERSION = YES; 337 | CLANG_WARN_CONSTANT_CONVERSION = YES; 338 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 339 | CLANG_WARN_EMPTY_BODY = YES; 340 | CLANG_WARN_ENUM_CONVERSION = YES; 341 | CLANG_WARN_INT_CONVERSION = YES; 342 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 343 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 344 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 345 | COPY_PHASE_STRIP = NO; 346 | GCC_C_LANGUAGE_STANDARD = gnu99; 347 | GCC_DYNAMIC_NO_PIC = NO; 348 | GCC_OPTIMIZATION_LEVEL = 0; 349 | GCC_PREPROCESSOR_DEFINITIONS = ( 350 | "DEBUG=1", 351 | "$(inherited)", 352 | ); 353 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 354 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 355 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 356 | GCC_WARN_UNDECLARED_SELECTOR = YES; 357 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 358 | GCC_WARN_UNUSED_FUNCTION = YES; 359 | GCC_WARN_UNUSED_VARIABLE = YES; 360 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 361 | ONLY_ACTIVE_ARCH = YES; 362 | SDKROOT = iphoneos; 363 | TARGETED_DEVICE_FAMILY = "1,2"; 364 | }; 365 | name = Debug; 366 | }; 367 | C328D13619B44A6E0042516B /* Release */ = { 368 | isa = XCBuildConfiguration; 369 | buildSettings = { 370 | ALWAYS_SEARCH_USER_PATHS = NO; 371 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 372 | CLANG_CXX_LIBRARY = "libc++"; 373 | CLANG_ENABLE_MODULES = YES; 374 | CLANG_ENABLE_OBJC_ARC = YES; 375 | CLANG_WARN_BOOL_CONVERSION = YES; 376 | CLANG_WARN_CONSTANT_CONVERSION = YES; 377 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 378 | CLANG_WARN_EMPTY_BODY = YES; 379 | CLANG_WARN_ENUM_CONVERSION = YES; 380 | CLANG_WARN_INT_CONVERSION = YES; 381 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 382 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 383 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 384 | COPY_PHASE_STRIP = YES; 385 | ENABLE_NS_ASSERTIONS = NO; 386 | GCC_C_LANGUAGE_STANDARD = gnu99; 387 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 388 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 389 | GCC_WARN_UNDECLARED_SELECTOR = YES; 390 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 391 | GCC_WARN_UNUSED_FUNCTION = YES; 392 | GCC_WARN_UNUSED_VARIABLE = YES; 393 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 394 | SDKROOT = iphoneos; 395 | TARGETED_DEVICE_FAMILY = "1,2"; 396 | VALIDATE_PRODUCT = YES; 397 | }; 398 | name = Release; 399 | }; 400 | C328D13819B44A6E0042516B /* Debug */ = { 401 | isa = XCBuildConfiguration; 402 | buildSettings = { 403 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 404 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 405 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 406 | GCC_PREFIX_HEADER = "SplittingTriangle/SplittingTriangle-Prefix.pch"; 407 | INFOPLIST_FILE = "SplittingTriangle/SplittingTriangle-Info.plist"; 408 | PRODUCT_NAME = "$(TARGET_NAME)"; 409 | WRAPPER_EXTENSION = app; 410 | }; 411 | name = Debug; 412 | }; 413 | C328D13919B44A6E0042516B /* Release */ = { 414 | isa = XCBuildConfiguration; 415 | buildSettings = { 416 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 417 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 418 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 419 | GCC_PREFIX_HEADER = "SplittingTriangle/SplittingTriangle-Prefix.pch"; 420 | INFOPLIST_FILE = "SplittingTriangle/SplittingTriangle-Info.plist"; 421 | PRODUCT_NAME = "$(TARGET_NAME)"; 422 | WRAPPER_EXTENSION = app; 423 | }; 424 | name = Release; 425 | }; 426 | C328D13B19B44A6E0042516B /* Debug */ = { 427 | isa = XCBuildConfiguration; 428 | buildSettings = { 429 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/SplittingTriangle.app/SplittingTriangle"; 430 | FRAMEWORK_SEARCH_PATHS = ( 431 | "$(SDKROOT)/Developer/Library/Frameworks", 432 | "$(inherited)", 433 | "$(DEVELOPER_FRAMEWORKS_DIR)", 434 | ); 435 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 436 | GCC_PREFIX_HEADER = "SplittingTriangle/SplittingTriangle-Prefix.pch"; 437 | GCC_PREPROCESSOR_DEFINITIONS = ( 438 | "DEBUG=1", 439 | "$(inherited)", 440 | ); 441 | INFOPLIST_FILE = "SplittingTriangleTests/SplittingTriangleTests-Info.plist"; 442 | PRODUCT_NAME = "$(TARGET_NAME)"; 443 | TEST_HOST = "$(BUNDLE_LOADER)"; 444 | WRAPPER_EXTENSION = xctest; 445 | }; 446 | name = Debug; 447 | }; 448 | C328D13C19B44A6E0042516B /* Release */ = { 449 | isa = XCBuildConfiguration; 450 | buildSettings = { 451 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/SplittingTriangle.app/SplittingTriangle"; 452 | FRAMEWORK_SEARCH_PATHS = ( 453 | "$(SDKROOT)/Developer/Library/Frameworks", 454 | "$(inherited)", 455 | "$(DEVELOPER_FRAMEWORKS_DIR)", 456 | ); 457 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 458 | GCC_PREFIX_HEADER = "SplittingTriangle/SplittingTriangle-Prefix.pch"; 459 | INFOPLIST_FILE = "SplittingTriangleTests/SplittingTriangleTests-Info.plist"; 460 | PRODUCT_NAME = "$(TARGET_NAME)"; 461 | TEST_HOST = "$(BUNDLE_LOADER)"; 462 | WRAPPER_EXTENSION = xctest; 463 | }; 464 | name = Release; 465 | }; 466 | /* End XCBuildConfiguration section */ 467 | 468 | /* Begin XCConfigurationList section */ 469 | C328D0FD19B44A6D0042516B /* Build configuration list for PBXProject "SplittingTriangle" */ = { 470 | isa = XCConfigurationList; 471 | buildConfigurations = ( 472 | C328D13519B44A6E0042516B /* Debug */, 473 | C328D13619B44A6E0042516B /* Release */, 474 | ); 475 | defaultConfigurationIsVisible = 0; 476 | defaultConfigurationName = Release; 477 | }; 478 | C328D13719B44A6E0042516B /* Build configuration list for PBXNativeTarget "SplittingTriangle" */ = { 479 | isa = XCConfigurationList; 480 | buildConfigurations = ( 481 | C328D13819B44A6E0042516B /* Debug */, 482 | C328D13919B44A6E0042516B /* Release */, 483 | ); 484 | defaultConfigurationIsVisible = 0; 485 | defaultConfigurationName = Release; 486 | }; 487 | C328D13A19B44A6E0042516B /* Build configuration list for PBXNativeTarget "SplittingTriangleTests" */ = { 488 | isa = XCConfigurationList; 489 | buildConfigurations = ( 490 | C328D13B19B44A6E0042516B /* Debug */, 491 | C328D13C19B44A6E0042516B /* Release */, 492 | ); 493 | defaultConfigurationIsVisible = 0; 494 | defaultConfigurationName = Release; 495 | }; 496 | /* End XCConfigurationList section */ 497 | }; 498 | rootObject = C328D0FA19B44A6D0042516B /* Project object */; 499 | } 500 | --------------------------------------------------------------------------------