├── p1.png
├── p2.png
├── p3.png
├── TestAlert
├── en.lproj
│ └── InfoPlist.strings
├── 3rdSource
│ └── UIImage-ResizeMagick
│ │ ├── .gitignore
│ │ ├── UIImage+ResizeMagick.h
│ │ ├── UIImage-ResizeMagick.podspec
│ │ ├── README.md
│ │ ├── LICENSE
│ │ └── UIImage+ResizeMagick.m
├── AppDelegate.h
├── main.m
├── TestAlert-Prefix.pch
├── Images.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── LaunchImage.launchimage
│ │ └── Contents.json
├── ViewController.h
├── TestAlert-Info.plist
├── AppDelegate.m
├── DoAlertView
│ ├── DoAlertView.h
│ └── DoAlertView.m
├── ViewController.m
└── Base.lproj
│ └── Main.storyboard
├── TestAlertTests
├── en.lproj
│ └── InfoPlist.strings
├── TestAlertTests-Info.plist
└── TestAlertTests.m
├── Resource
└── Images
│ ├── check.png
│ ├── close.png
│ ├── pic1.jpg
│ ├── pic2.jpg
│ ├── check@2x.png
│ ├── close@2x.png
│ ├── check_black.png
│ ├── close_black.png
│ ├── check_black@2x.png
│ └── close_black@2x.png
├── TestAlert.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
└── project.pbxproj
├── .gitignore
├── LICENSE
└── README.md
/p1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donobono/DoAlertView/HEAD/p1.png
--------------------------------------------------------------------------------
/p2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donobono/DoAlertView/HEAD/p2.png
--------------------------------------------------------------------------------
/p3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donobono/DoAlertView/HEAD/p3.png
--------------------------------------------------------------------------------
/TestAlert/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/TestAlertTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/Resource/Images/check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donobono/DoAlertView/HEAD/Resource/Images/check.png
--------------------------------------------------------------------------------
/Resource/Images/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donobono/DoAlertView/HEAD/Resource/Images/close.png
--------------------------------------------------------------------------------
/Resource/Images/pic1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donobono/DoAlertView/HEAD/Resource/Images/pic1.jpg
--------------------------------------------------------------------------------
/Resource/Images/pic2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donobono/DoAlertView/HEAD/Resource/Images/pic2.jpg
--------------------------------------------------------------------------------
/Resource/Images/check@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donobono/DoAlertView/HEAD/Resource/Images/check@2x.png
--------------------------------------------------------------------------------
/Resource/Images/close@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donobono/DoAlertView/HEAD/Resource/Images/close@2x.png
--------------------------------------------------------------------------------
/Resource/Images/check_black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donobono/DoAlertView/HEAD/Resource/Images/check_black.png
--------------------------------------------------------------------------------
/Resource/Images/close_black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donobono/DoAlertView/HEAD/Resource/Images/close_black.png
--------------------------------------------------------------------------------
/Resource/Images/check_black@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donobono/DoAlertView/HEAD/Resource/Images/check_black@2x.png
--------------------------------------------------------------------------------
/Resource/Images/close_black@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/donobono/DoAlertView/HEAD/Resource/Images/close_black@2x.png
--------------------------------------------------------------------------------
/TestAlert.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/TestAlert/3rdSource/UIImage-ResizeMagick/.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 | *.xcworkspace
13 | !default.xcworkspace
14 | xcuserdata
15 | profile
16 | *.moved-aside
17 | DerivedData
18 | .idea/
19 |
--------------------------------------------------------------------------------
/TestAlert/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // TestAlert
4 | //
5 | // Created by Seungbo Cho on 2013. 12. 19..
6 | // Copyright (c) 2013년 Seungbo Cho. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/TestAlert/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // TestAlert
4 | //
5 | // Created by Seungbo Cho on 2013. 12. 19..
6 | // Copyright (c) 2013년 Seungbo Cho. 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 |
--------------------------------------------------------------------------------
/TestAlert/TestAlert-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 |
--------------------------------------------------------------------------------
/TestAlert/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 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/TestAlert/3rdSource/UIImage-ResizeMagick/UIImage+ResizeMagick.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+ResizeMagick.h
3 | //
4 | //
5 | // Created by Vlad Andersen on 1/5/13.
6 | //
7 | //
8 |
9 |
10 |
11 | @interface UIImage (ResizeMagick)
12 |
13 | - (UIImage *) resizedImageByMagick: (NSString *) spec;
14 | - (UIImage *) resizedImageByWidth: (NSUInteger) width;
15 | - (UIImage *) resizedImageByHeight: (NSUInteger) height;
16 | - (UIImage *) resizedImageWithMaximumSize: (CGSize) size;
17 | - (UIImage *) resizedImageWithMinimumSize: (CGSize) size;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/TestAlert/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 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/TestAlertTests/TestAlertTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.lovelyhoy.${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 |
--------------------------------------------------------------------------------
/TestAlertTests/TestAlertTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // TestAlertTests.m
3 | // TestAlertTests
4 | //
5 | // Created by Seungbo Cho on 2013. 12. 19..
6 | // Copyright (c) 2013년 Seungbo Cho. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface TestAlertTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation TestAlertTests
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 |
--------------------------------------------------------------------------------
/TestAlert/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // TestAlert
4 | //
5 | // Created by Seungbo Cho on 2013. 12. 19..
6 | // Copyright (c) 2013년 Seungbo Cho. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "DoAlertView.h"
11 |
12 | @interface ViewController : UIViewController
13 |
14 | @property (weak, nonatomic) IBOutlet UISegmentedControl *sgSelect;
15 | @property (weak, nonatomic) IBOutlet UISegmentedControl *sgType;
16 | @property (weak, nonatomic) IBOutlet UISegmentedControl *sgSelectImage;
17 |
18 | @property (weak, nonatomic) IBOutlet UILabel *lbMode;
19 | @property (weak, nonatomic) IBOutlet UILabel *lbType;
20 |
21 | @property (strong, nonatomic) DoAlertView *vAlert;
22 |
23 | - (IBAction)onShowAlert:(id)sender;
24 |
25 | - (IBAction)onSelect:(id)sender;
26 | - (IBAction)onSelectAnimationType:(id)sender;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 donobono
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | 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, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/TestAlert/3rdSource/UIImage-ResizeMagick/UIImage-ResizeMagick.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 |
3 | s.name = "UIImage-ResizeMagick"
4 | s.version = "0.0.1"
5 | s.summary = "Resizing UIImage on iOS. ImageMagick-style."
6 |
7 | s.description = <<-DESC
8 | Resizing UIImage on iOS should be simple. This category
9 | provides a simple, yet flexible syntax to resize any image
10 | to your needs.
11 |
12 | - (UIImage *) resizedImageByMagick: (NSString *) spec;
13 |
14 | where spec conforms to the ImageMagick syntax conventions
15 | (think Paperclip).
16 |
17 | UIImage* resizedImage = [image resizedImageByMagick: @"320x320#"];
18 | DESC
19 |
20 | s.homepage = "https://github.com/mustangostang/UIImage-ResizeMagick"
21 | s.license = 'MIT'
22 |
23 | s.author = { "Vlad Andersen" => "vlad.andersen@gmail.com" }
24 | s.platform = :ios, '5.0'
25 |
26 | s.source = { :git => "https://github.com/mustangostang/UIImage-ResizeMagick.git", :tag => "0.0.1" }
27 | s.source_files = '*.{h,m}'
28 | s.requires_arc = true
29 |
30 | end
31 |
--------------------------------------------------------------------------------
/TestAlert/TestAlert-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | com.lovelyhoy.${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
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/TestAlert/3rdSource/UIImage-ResizeMagick/README.md:
--------------------------------------------------------------------------------
1 | UIImage-Resize (Magick!)
2 | ========================
3 |
4 | Resizing UIImage on iOS should be simple. This category provides a simple, yet flexible syntax to resize any image to your needs.
5 |
6 | ```objective-c
7 | - (UIImage *) resizedImageByMagick: (NSString *) spec;
8 | ```
9 |
10 | where **spec** could be one of the following expressions (follows ImageMagick syntax conventions):
11 |
12 | - [width] -- resize by width, height automatically selected to preserve aspect ratio.
13 | - x[height] -- resize by height, width automagically selected to preserve aspect ratio.
14 | - [width]x[height] -- maximum values of height and width given, aspect ratio preserved.
15 | - [width]x[height]^ -- minimum values of height and width given, aspect ratio preserved.
16 | - [width]x[height]! -- width and height emphatically given, original aspect ratio ignored.
17 | - [width]x[height]# -- scale and crop to exactly that size, original aspect ratio preserved (you probably want this one for your thumbnails).
18 |
19 | Example:
20 |
21 | ```objective-c
22 | UIImage* resizedImage = [image resizedImageByMagick: @"320x320#"];
23 | ```
24 |
25 | Caveat
26 | ------
27 |
28 | There is some support for orientations (not mirrored still). There is no support for scale (do we need it?), so please define pixel values.
29 |
30 | The project uses ARC, so you should compile UIImage-Resize.m with ```-fobjc-arc``` if your project is not using ARC.
31 |
32 | Additional methods:
33 | -------------------
34 |
35 | If you need some resizing with data known on-the-fly, this category defines the following additional methods:
36 |
37 | ```objective-c
38 | - (UIImage *) resizedImageByWidth: (NSUInteger) width;
39 | - (UIImage *) resizedImageByHeight: (NSUInteger) height;
40 | - (UIImage *) resizedImageWithMaximumSize: (CGSize) size;
41 | - (UIImage *) resizedImageWithMinimumSize: (CGSize) size;
42 | ```
43 |
--------------------------------------------------------------------------------
/TestAlert/3rdSource/UIImage-ResizeMagick/LICENSE:
--------------------------------------------------------------------------------
1 | Without any further information, all the sources provided here are under the MIT License
2 | quoted below.
3 |
4 | Anyway, please contact me by email (vlad.andersen@gmail.com) if you plan to use my work and the provided classes
5 | in your own software. Thanks.
6 |
7 |
8 | /***********************************************************************************
9 | *
10 | * Copyright (c) 2013 Vlad Andersen
11 | *
12 | * Permission is hereby granted, free of charge, to any person obtaining a copy
13 | * of this software and associated documentation files (the "Software"), to deal
14 | * in the Software without restriction, including without limitation the rights
15 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16 | * copies of the Software, and to permit persons to whom the Software is
17 | * furnished to do so, subject to the following conditions:
18 | *
19 | * The above copyright notice and this permission notice shall be included in
20 | * all copies or substantial portions of the Software.
21 | *
22 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28 | * THE SOFTWARE.
29 | *
30 | ***********************************************************************************
31 | *
32 | * Any comment or suggestion welcome. Referencing this project in your AboutBox is appreciated.
33 | * Please tell me if you use this class so we can cross-reference our projects.
34 | *
35 | ***********************************************************************************/
36 |
--------------------------------------------------------------------------------
/TestAlert/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // TestAlert
4 | //
5 | // Created by Seungbo Cho on 2013. 12. 19..
6 | // Copyright (c) 2013년 Seungbo Cho. 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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | DoAlertView
2 | ===========
3 |
4 | An replacement for UIAlertView : block-based, customizable theme, easy to use with image or map
5 |
6 | ## Preview
7 |
8 | ### with title, with yes button, with no button
9 | 
10 |
11 | ### without title, with yes button, with no button, with an image, destructive mode
12 | 
13 |
14 | ### without title, with only yes button, with a map
15 | 
16 |
17 |
18 | ## Requirements
19 | - iOS 7.0 and greater
20 | - ARC
21 |
22 |
23 | ## Examples
24 |
25 | **Code:**
26 |
27 | ```objc
28 |
29 | _vAlert = [[DoAlertView alloc] init];
30 | // required
31 | _vAlert.nAnimationType = _sgType.selectedSegmentIndex; // there are 5 type of animation
32 |
33 | // optional
34 | _vAlert.dRound = 2.0;
35 | _vAlert.bDestructive = NO; // for destructive mode
36 |
37 | // with image
38 | _vAlert.iImage = [UIImage imageNamed:@"pic1.jpg"];
39 | _vAlert.nContentMode = DoContentImage;
40 |
41 | // with map
42 | _vAlert.nContentMode = DoContentMap;
43 | _vAlert.dLocation = @{@"latitude" : @(37.78275123), @"longitude" : @(-122.40416442), @"altitude" : @200};
44 |
45 | // launch with title, yes button and no button
46 | [_vAlert doYesNo:@"Title"
47 | body:@"Here’s a snippet of code that illustrates how the whole process works"
48 | yes:^(DoAlertView *alertView) {
49 |
50 | NSLog(@"Yeeeeeeeeeeeees!!!!");
51 |
52 | } no:^(DoAlertView *alertView) {
53 |
54 | NSLog(@"Noooooooooooooo!!!!");
55 |
56 | }];
57 |
58 |
59 | // launch with only yes button
60 | _vAlert.bDestructive = YES;
61 | [_vAlert doYes:@"Here’s a snippet of code that illustrates how the whole process works"
62 | yes:^(DoAlertView *alertView) {
63 |
64 | NSLog(@"Yeeeeeeeeeeeees!!!!");
65 |
66 | }];
67 |
68 | // launch with timer, without any buttons
69 | [_vAlert doAlert:@"Please wait a second!"
70 | body:@"Getting great data from server..."
71 | duration:0.0
72 | done:^(DoAlertView *alertView) {
73 |
74 | NSLog(@"Done!!!!");
75 |
76 | }];
77 |
78 | ```
79 |
80 | ```objc
81 | // customizable theme
82 | #define DO_TITLE_BOX DO_RGB(218, 247, 244)
83 | #define DO_NORMAL_BOX DO_RGB(255, 255, 255)
84 | #define DO_BUTTON_BOX DO_RGB(13, 52, 85)
85 | #define DO_DESTRUCTIVE_BOX DO_RGB(236, 90, 73)
86 | #define DO_TEXT_COLOR DO_RGB(13, 52, 85)
87 | #define DO_DESTRUCTIVE_TEXT_COLOR DO_RGB(255, 255, 255)
88 | #define DO_DIMMED_COLOR DO_RGBA(0, 0, 0, 0.7)
89 |
90 | #define DO_TEXT_FONT [UIFont fontWithName:@"Avenir-Medium" size:14]
91 | #define DO_BOLD_FONT [UIFont fontWithName:@"Avenir-Heavy" size:14]
92 |
93 | #define DO_LABEL_INSET UIEdgeInsetsMake(10, 10, 10, 10)
94 | #define DO_TITLE_INSET UIEdgeInsetsMake(5, 10, 5, 10)
95 | #define DO_VIEW_WIDTH 280
96 |
97 | ```
98 |
99 | ## Credits
100 |
101 | DoAlertView was created by Dono Cho.
102 |
103 |
104 | ## License
105 |
106 | DoAlertView is available under the MIT license. See the LICENSE file for more info.
107 |
--------------------------------------------------------------------------------
/TestAlert/DoAlertView/DoAlertView.h:
--------------------------------------------------------------------------------
1 | //
2 | // DoAlertView.h
3 | // TestAlert
4 | //
5 | // Created by Donobono on 2013. 12. 19..
6 | //
7 |
8 | #import
9 | #import
10 |
11 | #define DO_RGB(r, g, b) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1]
12 | #define DO_RGBA(r, g, b, a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]
13 |
14 | // color set 1
15 | //#define DO_TITLE_BOX DO_RGB(113, 208, 243)
16 | //#define DO_NORMAL_BOX DO_RGB(57, 185, 238)
17 | //#define DO_BUTTON_BOX DO_RGB(113, 208, 243)
18 | //#define DO_DESTRUCTIVE_BOX DO_RGB(235, 15, 93)
19 | //#define DO_TEXT_COLOR DO_RGB(255, 255, 255)
20 | //#define DO_DESTRUCTIVE_TEXT_COLOR DO_RGB(255, 255, 255)
21 | //#define DO_DIMMED_COLOR DO_RGBA(0, 0, 0, 0.7)
22 |
23 | // color set 2
24 | #define DO_TITLE_BOX DO_RGB(218, 247, 244)
25 | #define DO_NORMAL_BOX DO_RGB(255, 255, 255)
26 | #define DO_BUTTON_BOX DO_RGB(13, 52, 85)
27 | #define DO_DESTRUCTIVE_BOX DO_RGB(236, 90, 73)
28 | #define DO_TEXT_COLOR DO_RGB(13, 52, 85)
29 | #define DO_DESTRUCTIVE_TEXT_COLOR DO_RGB(255, 255, 255)
30 | #define DO_DIMMED_COLOR DO_RGBA(0, 0, 0, 0.7)
31 |
32 | // color set 3
33 | //#define DO_TITLE_BOX DO_RGB(213, 204, 181)
34 | //#define DO_NORMAL_BOX DO_RGB(236, 236, 236)
35 | //#define DO_BUTTON_BOX DO_RGB(83, 34, 54)
36 | //#define DO_DESTRUCTIVE_BOX DO_RGB(193, 40, 66)
37 | //#define DO_TEXT_COLOR DO_RGB(83, 34, 54)
38 | //#define DO_DESTRUCTIVE_TEXT_COLOR DO_RGB(236, 236, 236)
39 | //#define DO_DIMMED_COLOR DO_RGBA(0, 0, 0, 0.7)
40 |
41 | #define DO_TEXT_FONT [UIFont fontWithName:@"Avenir-Medium" size:14]
42 | #define DO_BOLD_FONT [UIFont fontWithName:@"Avenir-Heavy" size:14]
43 |
44 | #define DO_LABEL_INSET UIEdgeInsetsMake(10, 10, 10, 10)
45 | #define DO_TITLE_INSET UIEdgeInsetsMake(5, 10, 5, 10)
46 | #define DO_VIEW_WIDTH 280
47 |
48 | #define DO_YES_TAG 100
49 | #define DO_NO_TAG 200
50 |
51 | #define DO_ROUND 3
52 |
53 | typedef NS_ENUM(int, DoAlertViewTransitionStyle) {
54 | DoTransitionStyleTopDown = 0,
55 | DoTransitionStyleBottomUp,
56 | DoTransitionStyleFade,
57 | DoTransitionStylePop,
58 | DoTransitionStyleLine,
59 | };
60 |
61 | typedef NS_ENUM(int, DoAlertViewContentType) {
62 | DoContentNone = 0,
63 | DoContentImage,
64 | DoContentMap,
65 | };
66 |
67 | @class DoAlertView;
68 | typedef void(^DoAlertViewHandler)(DoAlertView *alertView);
69 |
70 | @interface DoAlertView : UIView
71 | {
72 | @private
73 | NSString *_strAlertTitle;
74 | NSString *_strAlertBody;
75 | BOOL _bNeedNo;
76 |
77 | DoAlertViewHandler _doYes;
78 | DoAlertViewHandler _doNo;
79 | DoAlertViewHandler _doDone;
80 |
81 | UIWindow *_alertWindow;
82 | UIView *_vAlert;
83 | }
84 |
85 | @property (readwrite) int nAnimationType;
86 | @property (readwrite) int nContentMode;
87 |
88 | @property (readwrite) double dRound;
89 | @property (readwrite) BOOL bDestructive;
90 |
91 | @property (readonly) int nTag;
92 |
93 | // add content
94 | // for UIImageView
95 | @property (nonatomic, strong) UIImage *iImage;
96 | // for Map view
97 | @property (nonatomic, strong) NSDictionary *dLocation; // latitude, longitude
98 |
99 |
100 | // With Title, Alert body, Yes button, No button
101 | - (void)doYesNo:(NSString *)strTitle
102 | body:(NSString *)strBody
103 | yes:(DoAlertViewHandler)yes
104 | no:(DoAlertViewHandler)no;
105 |
106 | // With Alert body, Yes button, No button
107 | - (void)doYesNo:(NSString *)strBody
108 | yes:(DoAlertViewHandler)yes
109 | no:(DoAlertViewHandler)no;
110 |
111 | // With Title, Alert body, Only yes button
112 | - (void)doYes:(NSString *)strTitle
113 | body:(NSString *)strBody
114 | yes:(DoAlertViewHandler)yes;
115 |
116 | // With Alert body, Only yes button
117 | - (void)doYes:(NSString *)strBody
118 | yes:(DoAlertViewHandler)yes;
119 |
120 | // Without any button
121 | - (void)doAlert:(NSString *)strTitle
122 | body:(NSString *)strBody
123 | duration:(double)dDuration
124 | done:(DoAlertViewHandler)done;
125 | - (void)hideAlert;
126 |
127 | @end
128 |
--------------------------------------------------------------------------------
/TestAlert/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // TestAlert
4 | //
5 | // Created by Seungbo Cho on 2013. 12. 19..
6 | // Copyright (c) 2013년 Seungbo Cho. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad
18 | {
19 | [super viewDidLoad];
20 |
21 | _sgSelect.selectedSegmentIndex = 0;
22 | _sgType.selectedSegmentIndex = 0;
23 |
24 | [self onSelect:nil];
25 | [self onSelectAnimationType:nil];
26 | }
27 |
28 | - (void)didReceiveMemoryWarning
29 | {
30 | [super didReceiveMemoryWarning];
31 | // Dispose of any resources that can be recreated.
32 | }
33 |
34 | - (IBAction)onShowAlert:(id)sender
35 | {
36 | _vAlert = [[DoAlertView alloc] init];
37 | _vAlert.nAnimationType = _sgType.selectedSegmentIndex;
38 | _vAlert.dRound = 2.0;
39 |
40 | if (_sgSelectImage.selectedSegmentIndex == 1)
41 | {
42 | _vAlert.iImage = [UIImage imageNamed:@"pic1.jpg"];
43 | _vAlert.nContentMode = DoContentImage;
44 | }
45 | else if (_sgSelectImage.selectedSegmentIndex == 2)
46 | {
47 | _vAlert.iImage = [UIImage imageNamed:@"pic2.jpg"];
48 | _vAlert.nContentMode = DoContentImage;
49 | }
50 | else if (_sgSelectImage.selectedSegmentIndex == 3)
51 | {
52 | _vAlert.nContentMode = DoContentMap;
53 | _vAlert.dLocation = @{@"latitude" : @(37.78275123), @"longitude" : @(-122.40416442), @"altitude" : @200};
54 | }
55 |
56 | switch (_sgSelect.selectedSegmentIndex) {
57 | case 0:
58 | _vAlert.bDestructive = NO;
59 | [_vAlert doYesNo:@"Title"
60 | body:@"Here’s a snippet of code that illustrates how the whole process works"
61 | yes:^(DoAlertView *alertView) {
62 |
63 | NSLog(@"Yeeeeeeeeeeeees!!!!");
64 |
65 | } no:^(DoAlertView *alertView) {
66 |
67 | NSLog(@"Noooooooooooooo!!!!");
68 |
69 | }];
70 | _vAlert = nil;
71 | break;
72 |
73 | case 1:
74 | _vAlert.bDestructive = NO;
75 | [_vAlert doYes:@"Here’s a snippet of code that illustrates how the whole process works"
76 | yes:^(DoAlertView *alertView) {
77 |
78 | NSLog(@"Yeeeeeeeeeeeees!!!!");
79 |
80 | }];
81 | _vAlert = nil;
82 | break;
83 |
84 | case 2:
85 | _vAlert.bDestructive = YES;
86 | [_vAlert doYes:@"Here’s a snippet of code that illustrates how the whole process works"
87 | yes:^(DoAlertView *alertView) {
88 |
89 | NSLog(@"Yeeeeeeeeeeeees!!!!");
90 |
91 | }];
92 | _vAlert = nil;
93 | break;
94 |
95 | case 3:
96 | _vAlert.bDestructive = YES;
97 | [_vAlert doYesNo:@"Here’s a snippet of code that illustrates how the whole process works"
98 | yes:^(DoAlertView *alertView) {
99 |
100 | NSLog(@"Yeeeeeeeeeeeees!!!!");
101 |
102 | } no:^(DoAlertView *alertView) {
103 |
104 | NSLog(@"Noooooooooooooo!!!!");
105 |
106 | }];
107 | _vAlert = nil;
108 | break;
109 |
110 | case 4:
111 | // case 1 : alertview has timer.
112 | // [_vAlert doAlert:@"Please wait a second!"
113 | // body:@"Getting great data from server..."
114 | // duration:1.0
115 | // done:^(DoAlertView *alertView) {
116 | //
117 | // NSLog(@"Done!!!!");
118 | //
119 | // }];
120 | //
121 | // _vAlert = nil;
122 |
123 | // case 2 : viewcontroller has timer for async operations
124 | [_vAlert doAlert:@"Please wait a second!"
125 | body:@"Getting great data from server..."
126 | duration:0.0
127 | done:^(DoAlertView *alertView) {
128 |
129 | NSLog(@"Done!!!!");
130 |
131 | }];
132 |
133 | [NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(onTimerOfViewController) userInfo:nil repeats:NO];
134 | break;
135 |
136 | default:
137 | break;
138 | }
139 | }
140 |
141 | - (void)onTimerOfViewController
142 | {
143 | [_vAlert hideAlert];
144 | _vAlert = nil;
145 | }
146 |
147 | - (IBAction)onSelect:(id)sender
148 | {
149 | switch (_sgSelect.selectedSegmentIndex) {
150 | case 0:
151 | _lbMode.text = @"Yes/No with title";
152 | break;
153 | case 1:
154 | _lbMode.text = @"Yes";
155 | break;
156 | case 2:
157 | _lbMode.text = @"Yes destructive";
158 | break;
159 | case 3:
160 | _lbMode.text = @"Yes/No destructive";
161 | break;
162 | case 4:
163 | _lbMode.text = @"Without any button";
164 | break;
165 |
166 | default:
167 | break;
168 | }
169 | }
170 |
171 | - (IBAction)onSelectAnimationType:(id)sender
172 | {
173 | switch (_sgType.selectedSegmentIndex) {
174 | case DoTransitionStyleTopDown:
175 | _lbType.text = @"DoTransitionStyleTopDown";
176 | break;
177 | case DoTransitionStyleBottomUp:
178 | _lbType.text = @"DoTransitionStyleBottomUp";
179 | break;
180 | case DoTransitionStyleFade:
181 | _lbType.text = @"DoTransitionStyleFade";
182 | break;
183 | case DoTransitionStylePop:
184 | _lbType.text = @"DoTransitionStylePop";
185 | break;
186 | case DoTransitionStyleLine:
187 | _lbType.text = @"DoTransitionStyleLine";
188 | break;
189 |
190 | default:
191 | break;
192 | }
193 | }
194 |
195 | @end
196 |
--------------------------------------------------------------------------------
/TestAlert/3rdSource/UIImage-ResizeMagick/UIImage+ResizeMagick.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+ResizeMagick.m
3 | //
4 | //
5 | // Created by Vlad Andersen on 1/5/13.
6 | //
7 | //
8 |
9 | #import "UIImage+ResizeMagick.h"
10 |
11 | @implementation UIImage (ResizeMagick)
12 |
13 | // width Width given, height automagically selected to preserve aspect ratio.
14 | // xheight Height given, width automagically selected to preserve aspect ratio.
15 | // widthxheight Maximum values of height and width given, aspect ratio preserved.
16 | // widthxheight^ Minimum values of width and height given, aspect ratio preserved.
17 | // widthxheight! Exact dimensions, no aspect ratio preserved.
18 | // widthxheight# Crop to this exact dimensions.
19 |
20 | - (UIImage *) resizedImageByMagick: (NSString *) spec
21 | {
22 |
23 | if([spec hasSuffix:@"!"]) {
24 | NSString *specWithoutSuffix = [spec substringToIndex: [spec length] - 1];
25 | NSArray *widthAndHeight = [specWithoutSuffix componentsSeparatedByString: @"x"];
26 | NSUInteger width = [[widthAndHeight objectAtIndex: 0] longLongValue];
27 | NSUInteger height = [[widthAndHeight objectAtIndex: 1] longLongValue];
28 | UIImage *newImage = [self resizedImageWithMinimumSize: CGSizeMake (width, height)];
29 | return [newImage drawImageInBounds: CGRectMake (0, 0, width, height)];
30 | }
31 |
32 | if([spec hasSuffix:@"#"]) {
33 | NSString *specWithoutSuffix = [spec substringToIndex: [spec length] - 1];
34 | NSArray *widthAndHeight = [specWithoutSuffix componentsSeparatedByString: @"x"];
35 | NSUInteger width = [[widthAndHeight objectAtIndex: 0] longLongValue];
36 | NSUInteger height = [[widthAndHeight objectAtIndex: 1] longLongValue];
37 | UIImage *newImage = [self resizedImageWithMinimumSize: CGSizeMake (width, height)];
38 | return [newImage croppedImageWithRect: CGRectMake ((newImage.size.width - width) / 2, (newImage.size.height - height) / 2, width, height)];
39 | }
40 |
41 | if([spec hasSuffix:@"^"]) {
42 | NSString *specWithoutSuffix = [spec substringToIndex: [spec length] - 1];
43 | NSArray *widthAndHeight = [specWithoutSuffix componentsSeparatedByString: @"x"];
44 | return [self resizedImageWithMinimumSize: CGSizeMake ([[widthAndHeight objectAtIndex: 0] longLongValue],
45 | [[widthAndHeight objectAtIndex: 1] longLongValue])];
46 | }
47 |
48 | NSArray *widthAndHeight = [spec componentsSeparatedByString: @"x"];
49 | if ([widthAndHeight count] == 1) {
50 | return [self resizedImageByWidth: [spec longLongValue]];
51 | }
52 | if ([[widthAndHeight objectAtIndex: 0] isEqualToString: @""]) {
53 | return [self resizedImageByHeight: [[widthAndHeight objectAtIndex: 1] longLongValue]];
54 | }
55 | return [self resizedImageWithMaximumSize: CGSizeMake ([[widthAndHeight objectAtIndex: 0] longLongValue],
56 | [[widthAndHeight objectAtIndex: 1] longLongValue])];
57 | }
58 |
59 | - (CGImageRef) CGImageWithCorrectOrientation
60 | {
61 | if (self.imageOrientation == UIImageOrientationDown) {
62 | //retaining because caller expects to own the reference
63 | CGImageRetain([self CGImage]);
64 | return [self CGImage];
65 | }
66 | UIGraphicsBeginImageContext(self.size);
67 |
68 | CGContextRef context = UIGraphicsGetCurrentContext();
69 |
70 | if (self.imageOrientation == UIImageOrientationRight) {
71 | CGContextRotateCTM (context, 90 * M_PI/180);
72 | } else if (self.imageOrientation == UIImageOrientationLeft) {
73 | CGContextRotateCTM (context, -90 * M_PI/180);
74 | } else if (self.imageOrientation == UIImageOrientationUp) {
75 | CGContextRotateCTM (context, 180 * M_PI/180);
76 | }
77 |
78 | [self drawAtPoint:CGPointMake(0, 0)];
79 |
80 | CGImageRef cgImage = CGBitmapContextCreateImage(context);
81 | UIGraphicsEndImageContext();
82 |
83 | return cgImage;
84 | }
85 |
86 |
87 | - (UIImage *) resizedImageByWidth: (NSUInteger) width
88 | {
89 | CGImageRef imgRef = [self CGImageWithCorrectOrientation];
90 | CGFloat original_width = CGImageGetWidth(imgRef);
91 | CGFloat original_height = CGImageGetHeight(imgRef);
92 | CGFloat ratio = width/original_width;
93 | CGImageRelease(imgRef);
94 | return [self drawImageInBounds: CGRectMake(0, 0, width, round(original_height * ratio))];
95 | }
96 |
97 | - (UIImage *) resizedImageByHeight: (NSUInteger) height
98 | {
99 | CGImageRef imgRef = [self CGImageWithCorrectOrientation];
100 | CGFloat original_width = CGImageGetWidth(imgRef);
101 | CGFloat original_height = CGImageGetHeight(imgRef);
102 | CGFloat ratio = height/original_height;
103 | CGImageRelease(imgRef);
104 | return [self drawImageInBounds: CGRectMake(0, 0, round(original_width * ratio), height)];
105 | }
106 |
107 | - (UIImage *) resizedImageWithMinimumSize: (CGSize) size
108 | {
109 | CGImageRef imgRef = [self CGImageWithCorrectOrientation];
110 | CGFloat original_width = CGImageGetWidth(imgRef);
111 | CGFloat original_height = CGImageGetHeight(imgRef);
112 | CGFloat width_ratio = size.width / original_width;
113 | CGFloat height_ratio = size.height / original_height;
114 | CGFloat scale_ratio = width_ratio > height_ratio ? width_ratio : height_ratio;
115 | CGImageRelease(imgRef);
116 | return [self drawImageInBounds: CGRectMake(0, 0, round(original_width * scale_ratio), round(original_height * scale_ratio))];
117 | }
118 |
119 | - (UIImage *) resizedImageWithMaximumSize: (CGSize) size
120 | {
121 | CGImageRef imgRef = [self CGImageWithCorrectOrientation];
122 | CGFloat original_width = CGImageGetWidth(imgRef);
123 | CGFloat original_height = CGImageGetHeight(imgRef);
124 | CGFloat width_ratio = size.width / original_width;
125 | CGFloat height_ratio = size.height / original_height;
126 | CGFloat scale_ratio = width_ratio < height_ratio ? width_ratio : height_ratio;
127 | CGImageRelease(imgRef);
128 | return [self drawImageInBounds: CGRectMake(0, 0, round(original_width * scale_ratio), round(original_height * scale_ratio))];
129 | }
130 |
131 | - (UIImage *) drawImageInBounds: (CGRect) bounds
132 | {
133 | UIGraphicsBeginImageContext(bounds.size);
134 | [self drawInRect: bounds];
135 | UIImage *resizedImage = UIGraphicsGetImageFromCurrentImageContext();
136 | UIGraphicsEndImageContext();
137 | return resizedImage;
138 | }
139 |
140 | - (UIImage*) croppedImageWithRect: (CGRect) rect {
141 |
142 | UIGraphicsBeginImageContext(rect.size);
143 | CGContextRef context = UIGraphicsGetCurrentContext();
144 | CGRect drawRect = CGRectMake(-rect.origin.x, -rect.origin.y, self.size.width, self.size.height);
145 | CGContextClipToRect(context, CGRectMake(0, 0, rect.size.width, rect.size.height));
146 | [self drawInRect:drawRect];
147 | UIImage* subImage = UIGraphicsGetImageFromCurrentImageContext();
148 | UIGraphicsEndImageContext();
149 |
150 | return subImage;
151 | }
152 |
153 |
154 | @end
155 |
--------------------------------------------------------------------------------
/TestAlert/Base.lproj/Main.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 |
41 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
--------------------------------------------------------------------------------
/TestAlert/DoAlertView/DoAlertView.m:
--------------------------------------------------------------------------------
1 | //
2 | // DoAlertView.m
3 | // TestAlert
4 | //
5 | // Created by Donobono on 2013. 12. 19..
6 | //
7 |
8 | #import "DoAlertView.h"
9 | #import "UIImage+ResizeMagick.h" // Created by Vlad Andersen on 1/5/13.
10 |
11 | #pragma mark - DoAlertViewController
12 |
13 | @interface DoAlertViewController : UIViewController
14 |
15 | @property (nonatomic, strong) DoAlertView *alertView;
16 |
17 | @end
18 |
19 | @implementation DoAlertViewController
20 |
21 | #pragma mark - View life cycle
22 |
23 | - (void)viewDidLoad
24 | {
25 | [super viewDidLoad];
26 | self.view = _alertView;
27 | }
28 |
29 | - (UIStatusBarStyle)preferredStatusBarStyle
30 | {
31 | return [UIApplication sharedApplication].statusBarStyle;
32 | }
33 |
34 | @end
35 |
36 |
37 | #pragma mark - DoAlertViewController
38 |
39 | @implementation DoAlertView
40 |
41 | - (id)initWithFrame:(CGRect)frame
42 | {
43 | self = [super initWithFrame:frame];
44 | if (self) {
45 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receivedRotate:) name:UIDeviceOrientationDidChangeNotification object:nil];
46 | }
47 | return self;
48 | }
49 |
50 | // With Title, Alert body, Yes button, No button
51 | - (void)doYesNo:(NSString *)strTitle
52 | body:(NSString *)strBody
53 | yes:(DoAlertViewHandler)yes
54 | no:(DoAlertViewHandler)no
55 | {
56 | _strAlertTitle = strTitle;
57 | _strAlertBody = strBody;
58 | _bNeedNo = YES;
59 |
60 | _doYes = yes;
61 | _doNo = no;
62 |
63 | [self showAlertView];
64 | }
65 |
66 | // With Alert body, Yes button, No button
67 | - (void)doYesNo:(NSString *)strBody
68 | yes:(DoAlertViewHandler)yes
69 | no:(DoAlertViewHandler)no
70 | {
71 | _strAlertTitle = nil;
72 | _strAlertBody = strBody;
73 | _bNeedNo = YES;
74 |
75 | _doYes = yes;
76 | _doNo = no;
77 |
78 | [self showAlertView];
79 | }
80 |
81 | // With Title, Alert body, Only yes button
82 | - (void)doYes:(NSString *)strTitle
83 | body:(NSString *)strBody
84 | yes:(DoAlertViewHandler)yes
85 | {
86 | _strAlertTitle = strTitle;
87 | _strAlertBody = strBody;
88 | _bNeedNo = NO;
89 |
90 | _doYes = yes;
91 | _doNo = nil;
92 |
93 | [self showAlertView];
94 | }
95 |
96 | // With Alert body, Only yes button
97 | - (void)doYes:(NSString *)strBody
98 | yes:(DoAlertViewHandler)yes
99 | {
100 | _strAlertTitle = nil;
101 | _strAlertBody = strBody;
102 | _bNeedNo = NO;
103 |
104 | _doYes = yes;
105 | _doNo = nil;
106 |
107 | [self showAlertView];
108 | }
109 |
110 | // Without any button
111 | - (void)doAlert:(NSString *)strTitle
112 | body:(NSString *)strBody
113 | duration:(double)dDuration
114 | done:(DoAlertViewHandler)done
115 | {
116 | _strAlertTitle = strTitle;
117 | _strAlertBody = strBody;
118 | _bNeedNo = NO;
119 |
120 | _doYes = nil;
121 | _doNo = nil;
122 | _doDone = done;
123 |
124 | [self showAlertView];
125 |
126 | if (dDuration > 0)
127 | [NSTimer scheduledTimerWithTimeInterval:dDuration target:self selector:@selector(onTimer) userInfo:nil repeats:NO];
128 | }
129 |
130 | - (void)onTimer
131 | {
132 | [self hideAlert];
133 | }
134 |
135 | - (void)hideAlert
136 | {
137 | _nTag = DO_YES_TAG;
138 | [self hideAnimation];
139 | }
140 |
141 | - (void)showAlertView
142 | {
143 | double dHeight = 0;
144 | self.backgroundColor = DO_DIMMED_COLOR;
145 |
146 | // make back view -----------------------------------------------------------------------------------------------
147 | _vAlert = [[UIView alloc] initWithFrame:CGRectMake(0, 0, DO_VIEW_WIDTH, 0)];
148 | _vAlert.backgroundColor = DO_RGBA(255, 255, 255, 0.9);
149 | [self addSubview:_vAlert];
150 |
151 | // Title --------------------------------------------------------------------------------------------------------
152 | if (_strAlertTitle != nil && _strAlertTitle.length > 0)
153 | {
154 | UIView *vTitle = [[UIView alloc] initWithFrame:CGRectMake(0, 0, _vAlert.frame.size.width, 0)];
155 | if (_bDestructive)
156 | vTitle.backgroundColor = DO_DESTRUCTIVE_BOX;
157 | else
158 | vTitle.backgroundColor = DO_TITLE_BOX;
159 |
160 | [_vAlert addSubview:vTitle];
161 |
162 | UILabel *lbTitle = [[UILabel alloc] initWithFrame:CGRectMake(DO_TITLE_INSET.left, DO_TITLE_INSET.top,
163 | _vAlert.frame.size.width - (DO_TITLE_INSET.left + DO_TITLE_INSET.right) , 0)];
164 | lbTitle.text = _strAlertTitle;
165 | [self setLabelAttributes:lbTitle];
166 | lbTitle.frame = CGRectMake(DO_TITLE_INSET.left, DO_TITLE_INSET.top, lbTitle.frame.size.width, [self getTextHeight:lbTitle]);
167 | [vTitle addSubview:lbTitle];
168 |
169 | vTitle.frame = CGRectMake(0, 0, _vAlert.frame.size.width, lbTitle.frame.size.height + (DO_TITLE_INSET.top + DO_TITLE_INSET.bottom));
170 | dHeight = vTitle.frame.size.height + 1;
171 | }
172 |
173 | // Body ---------------------------------------------------------------------------------------------------------
174 | UIView *vBody = [[UIView alloc] initWithFrame:CGRectMake(0, dHeight - 0.5, _vAlert.frame.size.width, 0)];
175 | [_vAlert addSubview:vBody];
176 | if (_bDestructive)
177 | vBody.backgroundColor = DO_DESTRUCTIVE_BOX;
178 | else
179 | vBody.backgroundColor = DO_NORMAL_BOX;
180 |
181 | // Content ------------------------------------------------------------------------------------------------------
182 | double dContentOffset = [self addContent:vBody];
183 |
184 | // Body text ----------------------------------------------------------------------------------------------------
185 | UILabel *lbBody = [[UILabel alloc] initWithFrame:CGRectMake(DO_LABEL_INSET.left, DO_LABEL_INSET.top + dContentOffset,
186 | _vAlert.frame.size.width - (DO_LABEL_INSET.left + DO_LABEL_INSET.right) , 0)];
187 | lbBody.text = _strAlertBody;
188 | [self setLabelAttributes:lbBody];
189 | lbBody.frame = CGRectMake(DO_LABEL_INSET.left, lbBody.frame.origin.y, lbBody.frame.size.width, [self getTextHeight:lbBody]);
190 | [vBody addSubview:lbBody];
191 |
192 | vBody.frame = CGRectMake(0, dHeight - 0.5, _vAlert.frame.size.width,
193 | dContentOffset + lbBody.frame.size.height + (DO_LABEL_INSET.top + DO_LABEL_INSET.bottom) + 0.5);
194 | dHeight += vBody.frame.size.height;
195 |
196 | // No button -----------------------------------------------------------------------------------------------------
197 | if (_doNo != nil)
198 | {
199 | UIButton *btNo = [UIButton buttonWithType:UIButtonTypeCustom];
200 | btNo.frame = CGRectMake(0, dHeight, _vAlert.frame.size.width / 2.0 - 1, 40);
201 | btNo.backgroundColor = DO_BUTTON_BOX;
202 | btNo.tag = DO_NO_TAG;
203 | [btNo setImage:[UIImage imageNamed:@"close.png"] forState:UIControlStateNormal];
204 | [btNo addTarget:self action:@selector(buttonTarget:) forControlEvents:UIControlEventTouchUpInside];
205 |
206 | [_vAlert addSubview:btNo];
207 | }
208 |
209 | // Yes button -----------------------------------------------------------------------------------------------------
210 | if (_doYes != nil)
211 | {
212 | UIButton *btYes = [UIButton buttonWithType:UIButtonTypeCustom];
213 | if (_doNo == nil)
214 | btYes.frame = CGRectMake(0, dHeight, _vAlert.frame.size.width, 40);
215 | else
216 | btYes.frame = CGRectMake(_vAlert.frame.size.width / 2.0 - 0.5, dHeight, _vAlert.frame.size.width / 2.0 + 0.5, 40);
217 |
218 | btYes.backgroundColor = DO_BUTTON_BOX;
219 | btYes.tag = DO_YES_TAG;
220 | [btYes setImage:[UIImage imageNamed:@"check.png"] forState:UIControlStateNormal];
221 | [btYes addTarget:self action:@selector(buttonTarget:) forControlEvents:UIControlEventTouchUpInside];
222 |
223 | [_vAlert addSubview:btYes];
224 |
225 | dHeight += 40;
226 | }
227 |
228 | _vAlert.frame = CGRectMake(0, 0, DO_VIEW_WIDTH, dHeight);
229 |
230 | DoAlertViewController *viewController = [[DoAlertViewController alloc] initWithNibName:nil bundle:nil];
231 | viewController.alertView = self;
232 |
233 | if (!_alertWindow)
234 | {
235 | UIWindow *window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
236 | window.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
237 | window.opaque = NO;
238 | window.windowLevel = UIWindowLevelAlert;
239 | window.rootViewController = viewController;
240 | _alertWindow = window;
241 |
242 | self.frame = window.frame;
243 | _vAlert.center = window.center;
244 | }
245 | [_alertWindow makeKeyAndVisible];
246 |
247 | if (_dRound > 0)
248 | {
249 | CALayer *layer = [_vAlert layer];
250 | [layer setMasksToBounds:YES];
251 | [layer setCornerRadius:_dRound];
252 | }
253 |
254 | [self showAnimation];
255 | }
256 |
257 | - (void)buttonTarget:(id)sender
258 | {
259 | _nTag = (int)[sender tag];
260 | [self hideAnimation];
261 | }
262 |
263 | - (double)addContent:(UIView *)vBody
264 | {
265 | double dContentOffset = 0;
266 |
267 | switch (_nContentMode) {
268 | case DoContentImage:
269 | {
270 | UIImageView *iv = nil;
271 | if (_iImage != nil)
272 | {
273 | UIImage *iResized = [_iImage resizedImageWithMaximumSize:CGSizeMake(360, 360)];
274 |
275 | iv = [[UIImageView alloc] initWithImage:iResized];
276 | iv.contentMode = UIViewContentModeScaleAspectFit;
277 | iv.frame = CGRectMake(DO_LABEL_INSET.left, DO_LABEL_INSET.top, iResized.size.width / 2, iResized.size.height / 2);
278 | iv.center = CGPointMake(_vAlert.center.x, iv.center.y);
279 |
280 | [vBody addSubview:iv];
281 | dContentOffset = iv.frame.size.height + DO_LABEL_INSET.bottom;
282 | }
283 | }
284 | break;
285 |
286 | case DoContentMap:
287 | {
288 | if (_dLocation == nil)
289 | {
290 | dContentOffset = 0;
291 | break;
292 | }
293 |
294 | MKMapView *vMap = [[MKMapView alloc] initWithFrame:CGRectMake(DO_LABEL_INSET.left, DO_LABEL_INSET.top,
295 | 240, 180)];
296 | vMap.center = CGPointMake(vBody.center.x, vMap.center.y);
297 |
298 | vMap.delegate = self;
299 | vMap.centerCoordinate = CLLocationCoordinate2DMake([_dLocation[@"latitude"] doubleValue], [_dLocation[@"longitude"] doubleValue]);
300 | vMap.camera.altitude = [_dLocation[@"altitude"] doubleValue];
301 | vMap.camera.pitch = 70;
302 | vMap.showsBuildings = YES;
303 |
304 | [vBody addSubview:vMap];
305 | dContentOffset = 180 + DO_LABEL_INSET.bottom;
306 |
307 | MKPointAnnotation *annotation = [[MKPointAnnotation alloc] init];
308 | annotation.coordinate = vMap.centerCoordinate;
309 | annotation.title = @"Here~";
310 | [vMap addAnnotation:annotation];
311 | }
312 | break;
313 |
314 | default:
315 | break;
316 | }
317 |
318 | return dContentOffset;
319 | }
320 |
321 | - (double)getTextHeight:(UILabel *)lbText
322 | {
323 | NSDictionary *attributes = @{NSFontAttributeName:lbText.font};
324 | CGRect rect = [lbText.text boundingRectWithSize:CGSizeMake(lbText.frame.size.width, MAXFLOAT)
325 | options:NSStringDrawingUsesLineFragmentOrigin
326 | attributes:attributes
327 | context:nil];
328 |
329 | return ceil(rect.size.height);
330 | }
331 |
332 | - (void)setLabelAttributes:(UILabel *)lb
333 | {
334 | lb.backgroundColor = [UIColor clearColor];
335 | lb.textAlignment = NSTextAlignmentCenter;
336 | lb.numberOfLines = 0;
337 |
338 | if (_bDestructive)
339 | {
340 | lb.font = DO_BOLD_FONT;
341 | lb.textColor = DO_DESTRUCTIVE_TEXT_COLOR;
342 | }
343 | else
344 | {
345 | lb.font = DO_TEXT_FONT;
346 | lb.textColor = DO_TEXT_COLOR;
347 | }
348 | }
349 |
350 | - (void)hideAlertView
351 | {
352 | if (_doDone != nil)
353 | _doDone(self);
354 | else
355 | {
356 | if (_nTag == DO_YES_TAG)
357 | _doYes(self);
358 | else
359 | _doNo(self);
360 | }
361 |
362 | [self removeFromSuperview];
363 | [_alertWindow removeFromSuperview];
364 | _alertWindow = nil;
365 | }
366 |
367 | - (void)showAnimation
368 | {
369 | CGRect r = _vAlert.frame;
370 | CGPoint ptCenter = CGPointMake(self.bounds.size.width / 2.0, self.bounds.size.height / 2.0);
371 | self.alpha = 0.0;
372 |
373 | switch (_nAnimationType) {
374 | case DoTransitionStyleTopDown:
375 | _vAlert.center = CGPointMake(self.bounds.size.width / 2.0, -self.bounds.size.height / 2.0);
376 | break;
377 |
378 | case DoTransitionStyleBottomUp:
379 | _vAlert.center = CGPointMake(self.bounds.size.width / 2.0, self.bounds.size.height / 2.0 + self.bounds.size.height);
380 | break;
381 |
382 | case DoTransitionStyleFade:
383 | _vAlert.center = ptCenter;
384 | _vAlert.alpha = 0.0;
385 | break;
386 |
387 | case DoTransitionStylePop:
388 | _vAlert.alpha = 0.0;
389 | _vAlert.center = ptCenter;
390 | _vAlert.transform = CGAffineTransformMakeScale(0.05, 0.05);
391 | break;
392 |
393 | case DoTransitionStyleLine:
394 | _vAlert.frame = CGRectMake(self.bounds.size.width / 2.0, self.bounds.size.height / 2.0, 1, 1);
395 | _vAlert.clipsToBounds = YES;
396 | break;
397 |
398 | default:
399 | break;
400 | }
401 |
402 | double dDuration = 0.2;
403 |
404 | switch (_nAnimationType) {
405 | case DoTransitionStyleTopDown:
406 | case DoTransitionStyleBottomUp:
407 | dDuration = 0.3;
408 | break;
409 |
410 | default:
411 | break;
412 | }
413 |
414 | [UIView animateWithDuration:dDuration animations:^(void) {
415 |
416 | self.alpha = 1.0;
417 |
418 | switch (_nAnimationType) {
419 | case DoTransitionStyleTopDown:
420 | case DoTransitionStyleBottomUp:
421 | _vAlert.center = ptCenter;
422 | break;
423 |
424 | case DoTransitionStyleFade:
425 | _vAlert.alpha = 1.0;
426 | break;
427 |
428 | case DoTransitionStylePop:
429 | _vAlert.alpha = 1.0;
430 | _vAlert.transform = CGAffineTransformMakeScale(1.05, 1.05);
431 | break;
432 |
433 | case DoTransitionStyleLine:
434 | _vAlert.frame = CGRectMake((self.bounds.size.width - DO_VIEW_WIDTH) / 2, self.bounds.size.height / 2.0, DO_VIEW_WIDTH, 1);
435 | break;
436 |
437 | }
438 |
439 | } completion:^(BOOL finished) {
440 |
441 | switch (_nAnimationType) {
442 | case DoTransitionStylePop:
443 | {
444 | [UIView animateWithDuration:0.1 animations:^(void) {
445 | _vAlert.alpha = 1.0;
446 | _vAlert.transform = CGAffineTransformMakeScale(1.0, 1.0);
447 | }];
448 | }
449 | break;
450 |
451 | case DoTransitionStyleLine:
452 | {
453 | [UIView animateWithDuration:0.2 animations:^(void) {
454 | [UIView setAnimationDelay:0.1];
455 | _vAlert.center = ptCenter;
456 | _vAlert.frame = CGRectMake(_vAlert.frame.origin.x, _vAlert.frame.origin.y - r.size.height / 2.0, r.size.width, r.size.height);
457 | }];
458 | }
459 | break;
460 | }
461 | }];
462 | }
463 |
464 | - (void)hideAnimation
465 | {
466 | [[NSNotificationCenter defaultCenter] removeObserver:self name:UIDeviceOrientationDidChangeNotification object:nil];
467 |
468 | double dDuration = 0.2;
469 | switch (_nAnimationType) {
470 | case DoTransitionStyleTopDown:
471 | case DoTransitionStyleBottomUp:
472 | dDuration = 0.3;
473 | break;
474 | case DoTransitionStylePop:
475 | dDuration = 0.1;
476 | break;
477 |
478 | default:
479 | break;
480 | }
481 |
482 | [UIView animateWithDuration:dDuration animations:^(void) {
483 |
484 | switch (_nAnimationType) {
485 | case DoTransitionStyleTopDown:
486 | if (_nTag == DO_YES_TAG)
487 | _vAlert.center = CGPointMake(self.bounds.size.width / 2.0, self.bounds.size.height / 2.0 + self.bounds.size.height);
488 | else
489 | _vAlert.center = CGPointMake(self.bounds.size.width / 2.0, -self.bounds.size.height / 2.0);
490 |
491 | [UIView setAnimationDelay:0.1];
492 | self.alpha = 0.0;
493 | break;
494 |
495 | case DoTransitionStyleBottomUp:
496 | if (_nTag == DO_YES_TAG)
497 | _vAlert.center = CGPointMake(self.bounds.size.width / 2.0, -self.bounds.size.height / 2.0);
498 | else
499 | _vAlert.center = CGPointMake(self.bounds.size.width / 2.0, self.bounds.size.height / 2.0 + self.bounds.size.height);
500 |
501 | [UIView setAnimationDelay:0.1];
502 | self.alpha = 0.0;
503 | break;
504 |
505 | case DoTransitionStyleFade:
506 | _vAlert.alpha = 0.0;
507 |
508 | [UIView setAnimationDelay:0.1];
509 | self.alpha = 0.0;
510 | break;
511 |
512 | case DoTransitionStylePop:
513 | _vAlert.transform = CGAffineTransformMakeScale(1.05, 1.05);
514 | break;
515 |
516 | case DoTransitionStyleLine:
517 | _vAlert.frame = CGRectMake((self.bounds.size.width - DO_VIEW_WIDTH) / 2, self.bounds.size.height / 2.0, DO_VIEW_WIDTH, 1);
518 | break;
519 | }
520 |
521 | } completion:^(BOOL finished) {
522 |
523 | [UIView animateWithDuration:0.2 animations:^(void) {
524 |
525 | switch (_nAnimationType) {
526 | case DoTransitionStylePop:
527 | [UIView setAnimationDelay:0.05];
528 | self.alpha = 0.0;
529 | _vAlert.transform = CGAffineTransformMakeScale(0.05, 0.05);
530 | _vAlert.alpha = 0.0;
531 | break;
532 |
533 | case DoTransitionStyleLine:
534 | [UIView setAnimationDelay:0.1];
535 | _vAlert.frame = CGRectMake(self.bounds.size.width / 2.0, self.bounds.size.height / 2.0, 1, 1);
536 |
537 | [UIView setAnimationDelay:0.2];
538 | self.alpha = 0.0;
539 | break;
540 | }
541 |
542 | } completion:^(BOOL finished) {
543 | [self hideAlertView];
544 | }];
545 | }];
546 | }
547 |
548 | -(void)receivedRotate: (NSNotification *)notification
549 | {
550 | dispatch_async(dispatch_get_main_queue(), ^(void) {
551 |
552 | [UIView animateWithDuration:0.1 animations:^(void) {
553 |
554 | _vAlert.alpha = 0.0;
555 |
556 | } completion:^(BOOL finished) {
557 |
558 | [UIView animateWithDuration:0.2 animations:^(void) {
559 | _vAlert.center = CGPointMake(self.bounds.size.width / 2.0, self.bounds.size.height / 2.0);
560 | _vAlert.alpha = 1.0;
561 | }];
562 | }];
563 | });
564 | }
565 |
566 | @end
567 |
--------------------------------------------------------------------------------
/TestAlert.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 73116824186BDABA00CD2A41 /* check_black@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 73116820186BDABA00CD2A41 /* check_black@2x.png */; };
11 | 73116825186BDABA00CD2A41 /* check@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 73116821186BDABA00CD2A41 /* check@2x.png */; };
12 | 73116826186BDABA00CD2A41 /* close_black@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 73116822186BDABA00CD2A41 /* close_black@2x.png */; };
13 | 73116827186BDABA00CD2A41 /* close@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 73116823186BDABA00CD2A41 /* close@2x.png */; };
14 | 736E249718630E9F00E5A437 /* .gitignore in Resources */ = {isa = PBXBuildFile; fileRef = 736E249118630E9F00E5A437 /* .gitignore */; };
15 | 736E249818630E9F00E5A437 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 736E249218630E9F00E5A437 /* LICENSE */; };
16 | 736E249918630E9F00E5A437 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 736E249318630E9F00E5A437 /* README.md */; };
17 | 736E249A18630E9F00E5A437 /* UIImage+ResizeMagick.m in Sources */ = {isa = PBXBuildFile; fileRef = 736E249518630E9F00E5A437 /* UIImage+ResizeMagick.m */; };
18 | 736E249B18630E9F00E5A437 /* UIImage-ResizeMagick.podspec in Resources */ = {isa = PBXBuildFile; fileRef = 736E249618630E9F00E5A437 /* UIImage-ResizeMagick.podspec */; };
19 | 736E249E1863129200E5A437 /* pic1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 736E249C1863129200E5A437 /* pic1.jpg */; };
20 | 736E249F1863129200E5A437 /* pic2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 736E249D1863129200E5A437 /* pic2.jpg */; };
21 | 736E24A51863D85000E5A437 /* check_black.png in Resources */ = {isa = PBXBuildFile; fileRef = 736E24A11863D85000E5A437 /* check_black.png */; };
22 | 736E24A61863D85000E5A437 /* check.png in Resources */ = {isa = PBXBuildFile; fileRef = 736E24A21863D85000E5A437 /* check.png */; };
23 | 736E24A71863D85000E5A437 /* close_black.png in Resources */ = {isa = PBXBuildFile; fileRef = 736E24A31863D85000E5A437 /* close_black.png */; };
24 | 736E24A81863D85000E5A437 /* close.png in Resources */ = {isa = PBXBuildFile; fileRef = 736E24A41863D85000E5A437 /* close.png */; };
25 | 737FA4E5186C2C8E008FA5AA /* DoAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 737FA4E4186C2C8E008FA5AA /* DoAlertView.m */; };
26 | 73F0477718629145009C5692 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73F0477618629145009C5692 /* Foundation.framework */; };
27 | 73F0477918629145009C5692 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73F0477818629145009C5692 /* CoreGraphics.framework */; };
28 | 73F0477B18629145009C5692 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73F0477A18629145009C5692 /* UIKit.framework */; };
29 | 73F0478118629145009C5692 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 73F0477F18629145009C5692 /* InfoPlist.strings */; };
30 | 73F0478318629145009C5692 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 73F0478218629145009C5692 /* main.m */; };
31 | 73F0478718629145009C5692 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 73F0478618629145009C5692 /* AppDelegate.m */; };
32 | 73F0478A18629145009C5692 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 73F0478818629145009C5692 /* Main.storyboard */; };
33 | 73F0478D18629145009C5692 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 73F0478C18629145009C5692 /* ViewController.m */; };
34 | 73F0478F18629145009C5692 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 73F0478E18629145009C5692 /* Images.xcassets */; };
35 | 73F0479618629145009C5692 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73F0479518629145009C5692 /* XCTest.framework */; };
36 | 73F0479718629145009C5692 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73F0477618629145009C5692 /* Foundation.framework */; };
37 | 73F0479818629145009C5692 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73F0477A18629145009C5692 /* UIKit.framework */; };
38 | 73F047A018629145009C5692 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 73F0479E18629145009C5692 /* InfoPlist.strings */; };
39 | 73F047A218629145009C5692 /* TestAlertTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 73F047A118629145009C5692 /* TestAlertTests.m */; };
40 | /* End PBXBuildFile section */
41 |
42 | /* Begin PBXContainerItemProxy section */
43 | 73F0479918629145009C5692 /* PBXContainerItemProxy */ = {
44 | isa = PBXContainerItemProxy;
45 | containerPortal = 73F0476B18629145009C5692 /* Project object */;
46 | proxyType = 1;
47 | remoteGlobalIDString = 73F0477218629145009C5692;
48 | remoteInfo = TestAlert;
49 | };
50 | /* End PBXContainerItemProxy section */
51 |
52 | /* Begin PBXFileReference section */
53 | 73116820186BDABA00CD2A41 /* check_black@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "check_black@2x.png"; sourceTree = ""; };
54 | 73116821186BDABA00CD2A41 /* check@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "check@2x.png"; sourceTree = ""; };
55 | 73116822186BDABA00CD2A41 /* close_black@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "close_black@2x.png"; sourceTree = ""; };
56 | 73116823186BDABA00CD2A41 /* close@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "close@2x.png"; sourceTree = ""; };
57 | 736E249118630E9F00E5A437 /* .gitignore */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .gitignore; sourceTree = ""; };
58 | 736E249218630E9F00E5A437 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; };
59 | 736E249318630E9F00E5A437 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = ""; };
60 | 736E249418630E9F00E5A437 /* UIImage+ResizeMagick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+ResizeMagick.h"; sourceTree = ""; };
61 | 736E249518630E9F00E5A437 /* UIImage+ResizeMagick.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ResizeMagick.m"; sourceTree = ""; };
62 | 736E249618630E9F00E5A437 /* UIImage-ResizeMagick.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "UIImage-ResizeMagick.podspec"; sourceTree = ""; };
63 | 736E249C1863129200E5A437 /* pic1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = pic1.jpg; sourceTree = ""; };
64 | 736E249D1863129200E5A437 /* pic2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = pic2.jpg; sourceTree = ""; };
65 | 736E24A11863D85000E5A437 /* check_black.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = check_black.png; sourceTree = ""; };
66 | 736E24A21863D85000E5A437 /* check.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = check.png; sourceTree = ""; };
67 | 736E24A31863D85000E5A437 /* close_black.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = close_black.png; sourceTree = ""; };
68 | 736E24A41863D85000E5A437 /* close.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = close.png; sourceTree = ""; };
69 | 737FA4E3186C2C8E008FA5AA /* DoAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DoAlertView.h; sourceTree = ""; };
70 | 737FA4E4186C2C8E008FA5AA /* DoAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DoAlertView.m; sourceTree = ""; };
71 | 73F0477318629145009C5692 /* TestAlert.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestAlert.app; sourceTree = BUILT_PRODUCTS_DIR; };
72 | 73F0477618629145009C5692 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
73 | 73F0477818629145009C5692 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
74 | 73F0477A18629145009C5692 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
75 | 73F0477E18629145009C5692 /* TestAlert-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TestAlert-Info.plist"; sourceTree = ""; };
76 | 73F0478018629145009C5692 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
77 | 73F0478218629145009C5692 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
78 | 73F0478418629145009C5692 /* TestAlert-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TestAlert-Prefix.pch"; sourceTree = ""; };
79 | 73F0478518629145009C5692 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
80 | 73F0478618629145009C5692 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
81 | 73F0478918629145009C5692 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
82 | 73F0478B18629145009C5692 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
83 | 73F0478C18629145009C5692 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
84 | 73F0478E18629145009C5692 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
85 | 73F0479418629145009C5692 /* TestAlertTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TestAlertTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
86 | 73F0479518629145009C5692 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
87 | 73F0479D18629145009C5692 /* TestAlertTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TestAlertTests-Info.plist"; sourceTree = ""; };
88 | 73F0479F18629145009C5692 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
89 | 73F047A118629145009C5692 /* TestAlertTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TestAlertTests.m; sourceTree = ""; };
90 | /* End PBXFileReference section */
91 |
92 | /* Begin PBXFrameworksBuildPhase section */
93 | 73F0477018629145009C5692 /* Frameworks */ = {
94 | isa = PBXFrameworksBuildPhase;
95 | buildActionMask = 2147483647;
96 | files = (
97 | 73F0477918629145009C5692 /* CoreGraphics.framework in Frameworks */,
98 | 73F0477B18629145009C5692 /* UIKit.framework in Frameworks */,
99 | 73F0477718629145009C5692 /* Foundation.framework in Frameworks */,
100 | );
101 | runOnlyForDeploymentPostprocessing = 0;
102 | };
103 | 73F0479118629145009C5692 /* Frameworks */ = {
104 | isa = PBXFrameworksBuildPhase;
105 | buildActionMask = 2147483647;
106 | files = (
107 | 73F0479618629145009C5692 /* XCTest.framework in Frameworks */,
108 | 73F0479818629145009C5692 /* UIKit.framework in Frameworks */,
109 | 73F0479718629145009C5692 /* Foundation.framework in Frameworks */,
110 | );
111 | runOnlyForDeploymentPostprocessing = 0;
112 | };
113 | /* End PBXFrameworksBuildPhase section */
114 |
115 | /* Begin PBXGroup section */
116 | 736E248F18630E9F00E5A437 /* 3rdSource */ = {
117 | isa = PBXGroup;
118 | children = (
119 | 736E249018630E9F00E5A437 /* UIImage-ResizeMagick */,
120 | );
121 | path = 3rdSource;
122 | sourceTree = "";
123 | };
124 | 736E249018630E9F00E5A437 /* UIImage-ResizeMagick */ = {
125 | isa = PBXGroup;
126 | children = (
127 | 736E249118630E9F00E5A437 /* .gitignore */,
128 | 736E249218630E9F00E5A437 /* LICENSE */,
129 | 736E249318630E9F00E5A437 /* README.md */,
130 | 736E249418630E9F00E5A437 /* UIImage+ResizeMagick.h */,
131 | 736E249518630E9F00E5A437 /* UIImage+ResizeMagick.m */,
132 | 736E249618630E9F00E5A437 /* UIImage-ResizeMagick.podspec */,
133 | );
134 | path = "UIImage-ResizeMagick";
135 | sourceTree = "";
136 | };
137 | 737FA4E2186C2C8E008FA5AA /* DoAlertView */ = {
138 | isa = PBXGroup;
139 | children = (
140 | 737FA4E3186C2C8E008FA5AA /* DoAlertView.h */,
141 | 737FA4E4186C2C8E008FA5AA /* DoAlertView.m */,
142 | );
143 | path = DoAlertView;
144 | sourceTree = "";
145 | };
146 | 73F0476A18629145009C5692 = {
147 | isa = PBXGroup;
148 | children = (
149 | 73F0477C18629145009C5692 /* TestAlert */,
150 | 73F0479B18629145009C5692 /* TestAlertTests */,
151 | 73F0477518629145009C5692 /* Frameworks */,
152 | 73F0477418629145009C5692 /* Products */,
153 | );
154 | sourceTree = "";
155 | };
156 | 73F0477418629145009C5692 /* Products */ = {
157 | isa = PBXGroup;
158 | children = (
159 | 73F0477318629145009C5692 /* TestAlert.app */,
160 | 73F0479418629145009C5692 /* TestAlertTests.xctest */,
161 | );
162 | name = Products;
163 | sourceTree = "";
164 | };
165 | 73F0477518629145009C5692 /* Frameworks */ = {
166 | isa = PBXGroup;
167 | children = (
168 | 73F0477618629145009C5692 /* Foundation.framework */,
169 | 73F0477818629145009C5692 /* CoreGraphics.framework */,
170 | 73F0477A18629145009C5692 /* UIKit.framework */,
171 | 73F0479518629145009C5692 /* XCTest.framework */,
172 | );
173 | name = Frameworks;
174 | sourceTree = "";
175 | };
176 | 73F0477C18629145009C5692 /* TestAlert */ = {
177 | isa = PBXGroup;
178 | children = (
179 | 736E248F18630E9F00E5A437 /* 3rdSource */,
180 | 737FA4E2186C2C8E008FA5AA /* DoAlertView */,
181 | 73F0478518629145009C5692 /* AppDelegate.h */,
182 | 73F0478618629145009C5692 /* AppDelegate.m */,
183 | 73F0478818629145009C5692 /* Main.storyboard */,
184 | 73F0478B18629145009C5692 /* ViewController.h */,
185 | 73F0478C18629145009C5692 /* ViewController.m */,
186 | 73F0478E18629145009C5692 /* Images.xcassets */,
187 | 73F047B01862A5C7009C5692 /* Resource */,
188 | 73F0477D18629145009C5692 /* Supporting Files */,
189 | );
190 | path = TestAlert;
191 | sourceTree = "";
192 | };
193 | 73F0477D18629145009C5692 /* Supporting Files */ = {
194 | isa = PBXGroup;
195 | children = (
196 | 73F0477E18629145009C5692 /* TestAlert-Info.plist */,
197 | 73F0477F18629145009C5692 /* InfoPlist.strings */,
198 | 73F0478218629145009C5692 /* main.m */,
199 | 73F0478418629145009C5692 /* TestAlert-Prefix.pch */,
200 | );
201 | name = "Supporting Files";
202 | sourceTree = "";
203 | };
204 | 73F0479B18629145009C5692 /* TestAlertTests */ = {
205 | isa = PBXGroup;
206 | children = (
207 | 73F047A118629145009C5692 /* TestAlertTests.m */,
208 | 73F0479C18629145009C5692 /* Supporting Files */,
209 | );
210 | path = TestAlertTests;
211 | sourceTree = "";
212 | };
213 | 73F0479C18629145009C5692 /* Supporting Files */ = {
214 | isa = PBXGroup;
215 | children = (
216 | 73F0479D18629145009C5692 /* TestAlertTests-Info.plist */,
217 | 73F0479E18629145009C5692 /* InfoPlist.strings */,
218 | );
219 | name = "Supporting Files";
220 | sourceTree = "";
221 | };
222 | 73F047B01862A5C7009C5692 /* Resource */ = {
223 | isa = PBXGroup;
224 | children = (
225 | 73F047B11862A5C7009C5692 /* Images */,
226 | );
227 | path = Resource;
228 | sourceTree = SOURCE_ROOT;
229 | };
230 | 73F047B11862A5C7009C5692 /* Images */ = {
231 | isa = PBXGroup;
232 | children = (
233 | 73116820186BDABA00CD2A41 /* check_black@2x.png */,
234 | 73116821186BDABA00CD2A41 /* check@2x.png */,
235 | 73116822186BDABA00CD2A41 /* close_black@2x.png */,
236 | 73116823186BDABA00CD2A41 /* close@2x.png */,
237 | 736E24A11863D85000E5A437 /* check_black.png */,
238 | 736E24A21863D85000E5A437 /* check.png */,
239 | 736E24A31863D85000E5A437 /* close_black.png */,
240 | 736E24A41863D85000E5A437 /* close.png */,
241 | 736E249C1863129200E5A437 /* pic1.jpg */,
242 | 736E249D1863129200E5A437 /* pic2.jpg */,
243 | );
244 | path = Images;
245 | sourceTree = "";
246 | };
247 | /* End PBXGroup section */
248 |
249 | /* Begin PBXNativeTarget section */
250 | 73F0477218629145009C5692 /* TestAlert */ = {
251 | isa = PBXNativeTarget;
252 | buildConfigurationList = 73F047A518629145009C5692 /* Build configuration list for PBXNativeTarget "TestAlert" */;
253 | buildPhases = (
254 | 73F0476F18629145009C5692 /* Sources */,
255 | 73F0477018629145009C5692 /* Frameworks */,
256 | 73F0477118629145009C5692 /* Resources */,
257 | );
258 | buildRules = (
259 | );
260 | dependencies = (
261 | );
262 | name = TestAlert;
263 | productName = TestAlert;
264 | productReference = 73F0477318629145009C5692 /* TestAlert.app */;
265 | productType = "com.apple.product-type.application";
266 | };
267 | 73F0479318629145009C5692 /* TestAlertTests */ = {
268 | isa = PBXNativeTarget;
269 | buildConfigurationList = 73F047A818629145009C5692 /* Build configuration list for PBXNativeTarget "TestAlertTests" */;
270 | buildPhases = (
271 | 73F0479018629145009C5692 /* Sources */,
272 | 73F0479118629145009C5692 /* Frameworks */,
273 | 73F0479218629145009C5692 /* Resources */,
274 | );
275 | buildRules = (
276 | );
277 | dependencies = (
278 | 73F0479A18629145009C5692 /* PBXTargetDependency */,
279 | );
280 | name = TestAlertTests;
281 | productName = TestAlertTests;
282 | productReference = 73F0479418629145009C5692 /* TestAlertTests.xctest */;
283 | productType = "com.apple.product-type.bundle.unit-test";
284 | };
285 | /* End PBXNativeTarget section */
286 |
287 | /* Begin PBXProject section */
288 | 73F0476B18629145009C5692 /* Project object */ = {
289 | isa = PBXProject;
290 | attributes = {
291 | LastUpgradeCheck = 0500;
292 | ORGANIZATIONNAME = "Seungbo Cho";
293 | TargetAttributes = {
294 | 73F0479318629145009C5692 = {
295 | TestTargetID = 73F0477218629145009C5692;
296 | };
297 | };
298 | };
299 | buildConfigurationList = 73F0476E18629145009C5692 /* Build configuration list for PBXProject "TestAlert" */;
300 | compatibilityVersion = "Xcode 3.2";
301 | developmentRegion = English;
302 | hasScannedForEncodings = 0;
303 | knownRegions = (
304 | en,
305 | Base,
306 | );
307 | mainGroup = 73F0476A18629145009C5692;
308 | productRefGroup = 73F0477418629145009C5692 /* Products */;
309 | projectDirPath = "";
310 | projectRoot = "";
311 | targets = (
312 | 73F0477218629145009C5692 /* TestAlert */,
313 | 73F0479318629145009C5692 /* TestAlertTests */,
314 | );
315 | };
316 | /* End PBXProject section */
317 |
318 | /* Begin PBXResourcesBuildPhase section */
319 | 73F0477118629145009C5692 /* Resources */ = {
320 | isa = PBXResourcesBuildPhase;
321 | buildActionMask = 2147483647;
322 | files = (
323 | 73116827186BDABA00CD2A41 /* close@2x.png in Resources */,
324 | 736E249718630E9F00E5A437 /* .gitignore in Resources */,
325 | 73116826186BDABA00CD2A41 /* close_black@2x.png in Resources */,
326 | 73F0478F18629145009C5692 /* Images.xcassets in Resources */,
327 | 736E24A51863D85000E5A437 /* check_black.png in Resources */,
328 | 736E249918630E9F00E5A437 /* README.md in Resources */,
329 | 736E24A71863D85000E5A437 /* close_black.png in Resources */,
330 | 73116825186BDABA00CD2A41 /* check@2x.png in Resources */,
331 | 736E24A61863D85000E5A437 /* check.png in Resources */,
332 | 73F0478118629145009C5692 /* InfoPlist.strings in Resources */,
333 | 736E24A81863D85000E5A437 /* close.png in Resources */,
334 | 736E249818630E9F00E5A437 /* LICENSE in Resources */,
335 | 73116824186BDABA00CD2A41 /* check_black@2x.png in Resources */,
336 | 736E249F1863129200E5A437 /* pic2.jpg in Resources */,
337 | 736E249E1863129200E5A437 /* pic1.jpg in Resources */,
338 | 736E249B18630E9F00E5A437 /* UIImage-ResizeMagick.podspec in Resources */,
339 | 73F0478A18629145009C5692 /* Main.storyboard in Resources */,
340 | );
341 | runOnlyForDeploymentPostprocessing = 0;
342 | };
343 | 73F0479218629145009C5692 /* Resources */ = {
344 | isa = PBXResourcesBuildPhase;
345 | buildActionMask = 2147483647;
346 | files = (
347 | 73F047A018629145009C5692 /* InfoPlist.strings in Resources */,
348 | );
349 | runOnlyForDeploymentPostprocessing = 0;
350 | };
351 | /* End PBXResourcesBuildPhase section */
352 |
353 | /* Begin PBXSourcesBuildPhase section */
354 | 73F0476F18629145009C5692 /* Sources */ = {
355 | isa = PBXSourcesBuildPhase;
356 | buildActionMask = 2147483647;
357 | files = (
358 | 73F0478D18629145009C5692 /* ViewController.m in Sources */,
359 | 736E249A18630E9F00E5A437 /* UIImage+ResizeMagick.m in Sources */,
360 | 73F0478718629145009C5692 /* AppDelegate.m in Sources */,
361 | 73F0478318629145009C5692 /* main.m in Sources */,
362 | 737FA4E5186C2C8E008FA5AA /* DoAlertView.m in Sources */,
363 | );
364 | runOnlyForDeploymentPostprocessing = 0;
365 | };
366 | 73F0479018629145009C5692 /* Sources */ = {
367 | isa = PBXSourcesBuildPhase;
368 | buildActionMask = 2147483647;
369 | files = (
370 | 73F047A218629145009C5692 /* TestAlertTests.m in Sources */,
371 | );
372 | runOnlyForDeploymentPostprocessing = 0;
373 | };
374 | /* End PBXSourcesBuildPhase section */
375 |
376 | /* Begin PBXTargetDependency section */
377 | 73F0479A18629145009C5692 /* PBXTargetDependency */ = {
378 | isa = PBXTargetDependency;
379 | target = 73F0477218629145009C5692 /* TestAlert */;
380 | targetProxy = 73F0479918629145009C5692 /* PBXContainerItemProxy */;
381 | };
382 | /* End PBXTargetDependency section */
383 |
384 | /* Begin PBXVariantGroup section */
385 | 73F0477F18629145009C5692 /* InfoPlist.strings */ = {
386 | isa = PBXVariantGroup;
387 | children = (
388 | 73F0478018629145009C5692 /* en */,
389 | );
390 | name = InfoPlist.strings;
391 | sourceTree = "";
392 | };
393 | 73F0478818629145009C5692 /* Main.storyboard */ = {
394 | isa = PBXVariantGroup;
395 | children = (
396 | 73F0478918629145009C5692 /* Base */,
397 | );
398 | name = Main.storyboard;
399 | sourceTree = "";
400 | };
401 | 73F0479E18629145009C5692 /* InfoPlist.strings */ = {
402 | isa = PBXVariantGroup;
403 | children = (
404 | 73F0479F18629145009C5692 /* en */,
405 | );
406 | name = InfoPlist.strings;
407 | sourceTree = "";
408 | };
409 | /* End PBXVariantGroup section */
410 |
411 | /* Begin XCBuildConfiguration section */
412 | 73F047A318629145009C5692 /* Debug */ = {
413 | isa = XCBuildConfiguration;
414 | buildSettings = {
415 | ALWAYS_SEARCH_USER_PATHS = NO;
416 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
417 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
418 | CLANG_CXX_LIBRARY = "libc++";
419 | CLANG_ENABLE_MODULES = YES;
420 | CLANG_ENABLE_OBJC_ARC = YES;
421 | CLANG_WARN_BOOL_CONVERSION = YES;
422 | CLANG_WARN_CONSTANT_CONVERSION = YES;
423 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
424 | CLANG_WARN_EMPTY_BODY = YES;
425 | CLANG_WARN_ENUM_CONVERSION = YES;
426 | CLANG_WARN_INT_CONVERSION = YES;
427 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
428 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
429 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
430 | COPY_PHASE_STRIP = NO;
431 | GCC_C_LANGUAGE_STANDARD = gnu99;
432 | GCC_DYNAMIC_NO_PIC = NO;
433 | GCC_OPTIMIZATION_LEVEL = 0;
434 | GCC_PREPROCESSOR_DEFINITIONS = (
435 | "DEBUG=1",
436 | "$(inherited)",
437 | );
438 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
439 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
440 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
441 | GCC_WARN_UNDECLARED_SELECTOR = YES;
442 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
443 | GCC_WARN_UNUSED_FUNCTION = YES;
444 | GCC_WARN_UNUSED_VARIABLE = YES;
445 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
446 | ONLY_ACTIVE_ARCH = YES;
447 | SDKROOT = iphoneos;
448 | };
449 | name = Debug;
450 | };
451 | 73F047A418629145009C5692 /* Release */ = {
452 | isa = XCBuildConfiguration;
453 | buildSettings = {
454 | ALWAYS_SEARCH_USER_PATHS = NO;
455 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
456 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
457 | CLANG_CXX_LIBRARY = "libc++";
458 | CLANG_ENABLE_MODULES = YES;
459 | CLANG_ENABLE_OBJC_ARC = YES;
460 | CLANG_WARN_BOOL_CONVERSION = YES;
461 | CLANG_WARN_CONSTANT_CONVERSION = YES;
462 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
463 | CLANG_WARN_EMPTY_BODY = YES;
464 | CLANG_WARN_ENUM_CONVERSION = YES;
465 | CLANG_WARN_INT_CONVERSION = YES;
466 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
467 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
468 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
469 | COPY_PHASE_STRIP = YES;
470 | ENABLE_NS_ASSERTIONS = NO;
471 | GCC_C_LANGUAGE_STANDARD = gnu99;
472 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
473 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
474 | GCC_WARN_UNDECLARED_SELECTOR = YES;
475 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
476 | GCC_WARN_UNUSED_FUNCTION = YES;
477 | GCC_WARN_UNUSED_VARIABLE = YES;
478 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
479 | SDKROOT = iphoneos;
480 | VALIDATE_PRODUCT = YES;
481 | };
482 | name = Release;
483 | };
484 | 73F047A618629145009C5692 /* Debug */ = {
485 | isa = XCBuildConfiguration;
486 | buildSettings = {
487 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
488 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
489 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
490 | GCC_PREFIX_HEADER = "TestAlert/TestAlert-Prefix.pch";
491 | INFOPLIST_FILE = "TestAlert/TestAlert-Info.plist";
492 | PRODUCT_NAME = "$(TARGET_NAME)";
493 | WRAPPER_EXTENSION = app;
494 | };
495 | name = Debug;
496 | };
497 | 73F047A718629145009C5692 /* Release */ = {
498 | isa = XCBuildConfiguration;
499 | buildSettings = {
500 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
501 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
502 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
503 | GCC_PREFIX_HEADER = "TestAlert/TestAlert-Prefix.pch";
504 | INFOPLIST_FILE = "TestAlert/TestAlert-Info.plist";
505 | PRODUCT_NAME = "$(TARGET_NAME)";
506 | WRAPPER_EXTENSION = app;
507 | };
508 | name = Release;
509 | };
510 | 73F047A918629145009C5692 /* Debug */ = {
511 | isa = XCBuildConfiguration;
512 | buildSettings = {
513 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
514 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TestAlert.app/TestAlert";
515 | FRAMEWORK_SEARCH_PATHS = (
516 | "$(SDKROOT)/Developer/Library/Frameworks",
517 | "$(inherited)",
518 | "$(DEVELOPER_FRAMEWORKS_DIR)",
519 | );
520 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
521 | GCC_PREFIX_HEADER = "TestAlert/TestAlert-Prefix.pch";
522 | GCC_PREPROCESSOR_DEFINITIONS = (
523 | "DEBUG=1",
524 | "$(inherited)",
525 | );
526 | INFOPLIST_FILE = "TestAlertTests/TestAlertTests-Info.plist";
527 | PRODUCT_NAME = "$(TARGET_NAME)";
528 | TEST_HOST = "$(BUNDLE_LOADER)";
529 | WRAPPER_EXTENSION = xctest;
530 | };
531 | name = Debug;
532 | };
533 | 73F047AA18629145009C5692 /* Release */ = {
534 | isa = XCBuildConfiguration;
535 | buildSettings = {
536 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
537 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TestAlert.app/TestAlert";
538 | FRAMEWORK_SEARCH_PATHS = (
539 | "$(SDKROOT)/Developer/Library/Frameworks",
540 | "$(inherited)",
541 | "$(DEVELOPER_FRAMEWORKS_DIR)",
542 | );
543 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
544 | GCC_PREFIX_HEADER = "TestAlert/TestAlert-Prefix.pch";
545 | INFOPLIST_FILE = "TestAlertTests/TestAlertTests-Info.plist";
546 | PRODUCT_NAME = "$(TARGET_NAME)";
547 | TEST_HOST = "$(BUNDLE_LOADER)";
548 | WRAPPER_EXTENSION = xctest;
549 | };
550 | name = Release;
551 | };
552 | /* End XCBuildConfiguration section */
553 |
554 | /* Begin XCConfigurationList section */
555 | 73F0476E18629145009C5692 /* Build configuration list for PBXProject "TestAlert" */ = {
556 | isa = XCConfigurationList;
557 | buildConfigurations = (
558 | 73F047A318629145009C5692 /* Debug */,
559 | 73F047A418629145009C5692 /* Release */,
560 | );
561 | defaultConfigurationIsVisible = 0;
562 | defaultConfigurationName = Release;
563 | };
564 | 73F047A518629145009C5692 /* Build configuration list for PBXNativeTarget "TestAlert" */ = {
565 | isa = XCConfigurationList;
566 | buildConfigurations = (
567 | 73F047A618629145009C5692 /* Debug */,
568 | 73F047A718629145009C5692 /* Release */,
569 | );
570 | defaultConfigurationIsVisible = 0;
571 | defaultConfigurationName = Release;
572 | };
573 | 73F047A818629145009C5692 /* Build configuration list for PBXNativeTarget "TestAlertTests" */ = {
574 | isa = XCConfigurationList;
575 | buildConfigurations = (
576 | 73F047A918629145009C5692 /* Debug */,
577 | 73F047AA18629145009C5692 /* Release */,
578 | );
579 | defaultConfigurationIsVisible = 0;
580 | defaultConfigurationName = Release;
581 | };
582 | /* End XCConfigurationList section */
583 | };
584 | rootObject = 73F0476B18629145009C5692 /* Project object */;
585 | }
586 |
--------------------------------------------------------------------------------