├── .DS_Store
├── demo.gif
├── RDPopupExample
├── .DS_Store
├── ViewController.h
├── AppDelegate.h
├── main.m
├── CustomPopup
│ ├── CustomPopup.m
│ ├── CustomPopup.h
│ └── CustomPopup.xib
├── RDPopup
│ ├── RDPopupProtocol.h
│ ├── RDPopup.h
│ └── RDPopup.m
├── ViewController.m
├── Info.plist
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
└── AppDelegate.m
├── RDPopupExample.xcodeproj
├── xcuserdata
│ └── webdiormac2.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── webdiormac2.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── project.pbxproj
└── README.md
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rajdhakate/RDPopup/HEAD/.DS_Store
--------------------------------------------------------------------------------
/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rajdhakate/RDPopup/HEAD/demo.gif
--------------------------------------------------------------------------------
/RDPopupExample/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rajdhakate/RDPopup/HEAD/RDPopupExample/.DS_Store
--------------------------------------------------------------------------------
/RDPopupExample.xcodeproj/xcuserdata/webdiormac2.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/RDPopupExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RDPopupExample.xcodeproj/project.xcworkspace/xcuserdata/webdiormac2.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rajdhakate/RDPopup/HEAD/RDPopupExample.xcodeproj/project.xcworkspace/xcuserdata/webdiormac2.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RDPopupExample/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // RDPopupExample
4 | //
5 | // Created by Webdior Mac - 2 on 27/09/17.
6 | // Copyright © 2017 Raj Dhakate. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/RDPopupExample/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // RDPopupExample
4 | //
5 | // Created by Webdior Mac - 2 on 27/09/17.
6 | // Copyright © 2017 Raj Dhakate. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/RDPopupExample/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // RDPopupExample
4 | //
5 | // Created by Webdior Mac - 2 on 27/09/17.
6 | // Copyright © 2017 Raj Dhakate. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/RDPopupExample.xcodeproj/xcuserdata/webdiormac2.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | RDPopupExample.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/RDPopupExample/CustomPopup/CustomPopup.m:
--------------------------------------------------------------------------------
1 | //
2 | // CustomPopup.m
3 | // RDPopupExample
4 | //
5 | // Created by Webdior Mac - 2 on 27/09/17.
6 | // Copyright © 2017 Raj Dhakate. All rights reserved.
7 | //
8 |
9 | #import "CustomPopup.h"
10 |
11 | @implementation CustomPopup
12 |
13 | /*
14 | // Only override drawRect: if you perform custom drawing.
15 | // An empty implementation adversely affects performance during animation.
16 | - (void)drawRect:(CGRect)rect {
17 | // Drawing code
18 | }
19 | */
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/RDPopupExample/RDPopup/RDPopupProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // RDPopupProtocol.h
3 | // RDPopupExample
4 | //
5 | // Created by Webdior Mac - 2 on 27/09/17.
6 | // Copyright © 2017 Raj Dhakate. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import "CustomPopup.h"
12 |
13 | @protocol RDPopupProtocol
14 |
15 | @required
16 | - (void)otherButtonAction:(CustomPopup*)popupView button:(UIButton*)button;
17 | - (void)cancelButtonAction:(CustomPopup*)popupView button:(UIButton*)button;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/RDPopupExample/CustomPopup/CustomPopup.h:
--------------------------------------------------------------------------------
1 | //
2 | // CustomPopup.h
3 | // RDPopupExample
4 | //
5 | // Created by Webdior Mac - 2 on 27/09/17.
6 | // Copyright © 2017 Raj Dhakate. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CustomPopup : UIView
12 |
13 | @property (strong, nonatomic) IBOutlet UIImageView *iconView;
14 | @property (strong, nonatomic) IBOutlet UIImageView *imgView;
15 | @property (strong, nonatomic) IBOutlet UILabel *titleLabel;
16 | @property (strong, nonatomic) IBOutlet UILabel *messageLabel;
17 | @property (strong, nonatomic) IBOutlet UIButton *otherButton;
18 | @property (strong, nonatomic) IBOutlet UIButton *cancelButton;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/RDPopupExample/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // RDPopupExample
4 | //
5 | // Created by Webdior Mac - 2 on 27/09/17.
6 | // Copyright © 2017 Raj Dhakate. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "RDPopup.h"
11 |
12 | @interface ViewController ()
13 | {
14 | RDPopup *popup;
15 | }
16 |
17 | @property (strong, nonatomic) IBOutlet UIButton *btn;
18 |
19 | @end
20 |
21 | @implementation ViewController
22 |
23 | - (void)viewDidLoad {
24 | [super viewDidLoad];
25 | // Do any additional setup after loading the view, typically from a nib.
26 |
27 | [_btn setTitle:@"Show Popup" forState:UIControlStateNormal];
28 | popup = [[RDPopup alloc]initOnView:self.view];
29 | popup.delegate = self;
30 | popup.title = @"New title";
31 | popup.message = @"New message";
32 | popup.cancelButtonTitle = @"Cancel";
33 | popup.otherButtonTitle = @"Done";
34 | popup.buttonRadius = 10;
35 | popup.dismissOnBackgroundTap = YES;
36 | }
37 |
38 | - (IBAction)buttonAction:(UIButton *)sender {
39 | [popup showPopup];
40 | }
41 |
42 | - (void)otherButtonAction:(CustomPopup *)popupView button:(UIButton *)button {
43 | popupView.titleLabel.text = @"DONE READING";
44 | button.backgroundColor = [UIColor blueColor];
45 | }
46 |
47 | - (void)cancelButtonAction:(CustomPopup *)popupView button:(UIButton *)button {
48 | [popup hidePopup];
49 | }
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/RDPopupExample/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/RDPopupExample/Base.lproj/LaunchScreen.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 |
--------------------------------------------------------------------------------
/RDPopupExample/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | }
88 | ],
89 | "info" : {
90 | "version" : 1,
91 | "author" : "xcode"
92 | }
93 | }
--------------------------------------------------------------------------------
/RDPopupExample/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // RDPopupExample
4 | //
5 | // Created by Webdior Mac - 2 on 27/09/17.
6 | // Copyright © 2017 Raj Dhakate. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 |
24 | - (void)applicationWillResignActive:(UIApplication *)application {
25 | // 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.
26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
27 | }
28 |
29 |
30 | - (void)applicationDidEnterBackground:(UIApplication *)application {
31 | // 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.
32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
33 | }
34 |
35 |
36 | - (void)applicationWillEnterForeground:(UIApplication *)application {
37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
38 | }
39 |
40 |
41 | - (void)applicationDidBecomeActive:(UIApplication *)application {
42 | // 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.
43 | }
44 |
45 |
46 | - (void)applicationWillTerminate:(UIApplication *)application {
47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
48 | }
49 |
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/RDPopupExample/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # RDPopup
2 |
3 | A simple way to add custom Popup. Design on Nib and use as you want.
4 | Written in Objective-C.
5 |
6 | 
7 |
8 | ## REQUISITE : Xcode 9 or Later, iOS 9+.**
9 |
10 | ## HOW TO ADD:
11 |
12 | 1. Clone/Download the master-repo.
13 |
14 | 2. Import ```"RDPopup"``` folder (.m/.h) into your project.
15 |
16 | 3. Create an ABCIntroView property and add the ABCIntroViewDelegate.
17 |
18 | 4. Add ```#import "RDPopup/RDPopup.h"```
19 |
20 | ## HOW TO USE:
21 |
22 | 1. Create a new view/nib file. Set the class name to "CustomPopup".
23 |
24 | 2. Set the outlets to your respective views.
25 |
26 | 3. Add these lines to create a popup
27 | ```
28 | RDPopup *popup = [[RDPopup alloc]initOnView:self.view];
29 |
30 | popup.delegate = self;
31 | ```
32 | 4. Implement two delegate methods.
33 |
34 | 5. To show [popup showPopup];
35 |
36 | 6. To hide [popup hidePopup];
37 |
38 |
39 | ## Customizations:
40 |
41 | Gives you the freedom to design you own popup in nib.
42 |
43 | Supported views on popup :
44 |
45 | Title Label, message label, cancel button, other button, icon imageview, imageview.
46 |
47 | RDPopup view can be customized by :
48 |
49 | ```objc
50 | /*
51 | Animation Duration . Default value 0.3
52 | */
53 |
54 | @property (assign, nonatomic) float animationDuration;
55 | ```
56 | ```objc
57 | /*
58 | Presenting animation type
59 | */
60 |
61 | @property (assign, nonatomic) FlyInAnimationDirection inAnimation;
62 | ```
63 | ```objc
64 | /*
65 | Dismissing animation type
66 | */
67 |
68 | @property (assign, nonatomic) FlyOutAnimationDirection outAnimation;
69 | ```
70 | ```objc
71 | /*
72 | Background Dim enable . Default value NO
73 | */
74 |
75 | @property (assign, nonatomic) BOOL blurBackground;
76 | ```
77 | ```objc
78 | /*
79 | Dismiss on Background Touch . Default value NO
80 | */
81 |
82 | @property (assign, nonatomic) BOOL dismissOnBackgroundTap;
83 | ```
84 | ```objc
85 | /*
86 | Background Dim Alpha . Default value 0.3
87 | */
88 |
89 | @property (assign, nonatomic) float dimBackgroundLevel;
90 | ```
91 | ```objc
92 | /*
93 | Title for Popup View. Default value @"Hi!"
94 | */
95 |
96 | @property (strong, nonatomic) NSString *title;
97 | ```
98 | ```objc
99 | /*
100 | Message for Popup View. Default value @"Hello World!"
101 | */
102 |
103 | @property (strong, nonatomic) NSString *message;
104 | ```
105 | ```objc
106 | /*
107 | Cancel button title for Popup View. Default value @"Cancel"
108 | */
109 |
110 | @property (strong, nonatomic) NSString *cancelButtonTitle;
111 | ```
112 | ```objc
113 | /*
114 | Other button title for Popup View. Default value @"Done"
115 | */
116 |
117 | @property (strong, nonatomic) NSString *otherButtonTitle;
118 | ```
119 | ```objc
120 | /*
121 | Buttons Radius . Default value 10
122 | */
123 |
124 | @property (assign, nonatomic) float buttonRadius;
125 | ```
126 | ```objc
127 | /*
128 | Corner radius for Popup view. Default value 10
129 | */
130 |
131 | @property (assign, nonatomic) float cornerRadius;
132 | ```
133 | ```objc
134 | /*
135 | Icon image name for Popup View. Default value @"icon"
136 | */
137 |
138 | @property (strong, nonatomic) NSString *iconName;
139 | ```
140 | ```objc
141 | /*
142 | Image name for Popup View. Default value @"icon"
143 | */
144 |
145 | @property (strong, nonatomic) NSString *imgName;
146 | ```
147 |
148 | # Support
149 |
150 | Please check the example included.
151 |
152 | Suggestions/Queries/Feedbacks are welcome.
153 |
154 | Feel free to contribute in anyway.
155 |
156 |
157 | CHEERS!
158 |
--------------------------------------------------------------------------------
/RDPopupExample/RDPopup/RDPopup.h:
--------------------------------------------------------------------------------
1 | //
2 | // RDPopup.h
3 | // RDPopupExample
4 | //
5 | // Created by Webdior Mac - 2 on 27/09/17.
6 | // Copyright © 2017 Raj Dhakate. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "RDPopupProtocol.h"
11 |
12 | @interface RDPopup : UIView
13 |
14 | @property (nonatomic, strong) id delegate;
15 |
16 | /*
17 | # Animations For Presenting Popup
18 | # Default value FlyInAnimationDefault
19 | */
20 | typedef enum {
21 | FlyInAnimationDefault,
22 | FlyInAnimationDirectionTop,
23 | FlyInAnimationDirectionBottom,
24 | FlyInAnimationDirectionLeft,
25 | FlyInAnimationDirectionRight
26 | } FlyInAnimationDirection;
27 |
28 | /*
29 | # Animations For Dismissing Popup
30 | # Default value FlyOutAnimationDefault
31 | */
32 | typedef enum {
33 | FlyOutAnimationDefault,
34 | FlyOutAnimationDirectionTop,
35 | FlyOutAnimationDirectionBottom,
36 | FlyOutAnimationDirectionLeft,
37 | FlyOutAnimationDirectionRight
38 | } FlyOutAnimationDirection;
39 |
40 | /*
41 | # IMPORTANT : Presenting View (superview on which popup is presented)
42 | */
43 | - (instancetype)initOnView:(UIView*)view;
44 |
45 | /*
46 | # Hide Show Methods
47 | */
48 | - (void) showPopup;
49 | - (void) hidePopup;
50 |
51 | //
52 | // Customizations For Popup View.
53 | //
54 |
55 | /*
56 | # Animation Duration . Default value 0.3
57 | */
58 | @property (assign, nonatomic) float animationDuration;
59 |
60 | /*
61 | # Presenting animation type
62 | */
63 | @property (assign, nonatomic) FlyInAnimationDirection inAnimation;
64 |
65 | /*
66 | # Dismissing animation type
67 | */
68 | @property (assign, nonatomic) FlyOutAnimationDirection outAnimation;
69 |
70 | /*
71 | # Background Dim enable . Default value NO
72 | */
73 | @property (assign, nonatomic) BOOL blurBackground;
74 |
75 | /*
76 | # Dismiss on Background Touch . Default value NO
77 | */
78 | @property (assign, nonatomic) BOOL dismissOnBackgroundTap;
79 |
80 | /*
81 | # Background Dim Alpha . Default value 0.3
82 | */
83 | @property (assign, nonatomic) float dimBackgroundLevel;
84 |
85 | /*
86 | # Margins for the view. Currently NOT supporting Autolayout.
87 | # Top Default value 250
88 | # Bottom Default value 250
89 | # Left Default value 250
90 | # Right Default value 250
91 | */
92 | @property (assign, nonatomic) float topMargin;
93 | @property (assign, nonatomic) float bottomMargin;
94 | @property (assign, nonatomic) float leftMargin;
95 | @property (assign, nonatomic) float rightMargin;
96 |
97 | /*
98 | # Title for Popup View. Default value @"Hi!"
99 | */
100 | @property (strong, nonatomic) NSString *title;
101 |
102 | /*
103 | # Message for Popup View. Default value @"Hello World!"
104 | */
105 | @property (strong, nonatomic) NSString *message;
106 |
107 | /*
108 | # Cancel button title for Popup View. Default value @"Cancel"
109 | */
110 | @property (strong, nonatomic) NSString *cancelButtonTitle;
111 |
112 | /*
113 | # Other button title for Popup View. Default value @"Done"
114 | */
115 | @property (strong, nonatomic) NSString *otherButtonTitle;
116 |
117 | /*
118 | # Buttons Radius . Default value 10
119 | */
120 | @property (assign, nonatomic) float buttonRadius;
121 |
122 | /*
123 | # Corner radius for Popup view. Default value 10
124 | */
125 | @property (assign, nonatomic) float cornerRadius;
126 |
127 | /*
128 | # Icon image name for Popup View. Default value @"icon"
129 | */
130 | @property (strong, nonatomic) NSString *iconName;
131 |
132 | /*
133 | # Image name for Popup View. Default value @"icon"
134 | */
135 | @property (strong, nonatomic) NSString *imgName;
136 |
137 | @end
138 |
--------------------------------------------------------------------------------
/RDPopupExample/CustomPopup/CustomPopup.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
27 |
38 |
47 |
53 |
63 |
64 |
65 |
66 |
67 |
68 |
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 |
--------------------------------------------------------------------------------
/RDPopupExample/RDPopup/RDPopup.m:
--------------------------------------------------------------------------------
1 | //
2 | // RDPopup.m
3 | // RDPopupExample
4 | //
5 | // Created by Webdior Mac - 2 on 27/09/17.
6 | // Copyright © 2017 Raj Dhakate. All rights reserved.
7 | //
8 |
9 | #import "RDPopup.h"
10 | #import "CustomPopup.h"
11 |
12 | #define WIN_HEIGHT [[UIScreen mainScreen] bounds].size.height
13 | #define WIN_WIDTH [[UIScreen mainScreen] bounds].size.width
14 | #define DefaultAnimationDuration 0.3
15 | #define DefaultInAnimation 0
16 | #define DefaultOutAnimation 0
17 | #define DefaultTitle @"Hi!"
18 | #define DefaultMessage @"Hello World!"
19 | #define DefaultCancelTitle @"Cancel"
20 | #define DefaultOtherTitle @"Done"
21 | #define DefaultIcon @"icon"
22 | #define DefaultImage @"image"
23 | #define DefaultTopMargin 100
24 | #define DefaultBottomMargin 100
25 | #define DefaultLeftMargin 15
26 | #define DefaultRightMargin 15
27 | #define DefaultDimmedLevel 0.3
28 | #define DefaultCornerRadius 10
29 | #define DefaultButtonRadius 10
30 |
31 | @interface RDPopup()
32 |
33 | @property (strong, nonatomic) CustomPopup *customView;
34 | @property (strong, nonatomic) UIView *view;
35 | @property (strong, nonatomic) UIView *dimBG;
36 | @property (strong, nonatomic) UIVisualEffectView *blurBG;
37 |
38 | @end
39 |
40 | @implementation RDPopup
41 |
42 | #pragma mark - Initialization Methods
43 | - (instancetype)initOnView:(UIView*)view {
44 | self.view = view;
45 | return self;
46 | }
47 |
48 | - (void) initialize {
49 | if (!self.inAnimation) {
50 | self.inAnimation = DefaultInAnimation;
51 | }
52 | if (!self.outAnimation) {
53 | self.outAnimation = DefaultOutAnimation;
54 | }
55 | if (!self.topMargin) {
56 | self.topMargin = DefaultTopMargin;
57 | }
58 | if (!self.bottomMargin) {
59 | self.bottomMargin = DefaultBottomMargin;
60 | }
61 | if (!self.leftMargin) {
62 | self.leftMargin = DefaultLeftMargin;
63 | }
64 | if (!self.rightMargin) {
65 | self.rightMargin = DefaultRightMargin;
66 | }
67 | if (!self.cornerRadius) {
68 | self.cornerRadius = DefaultCornerRadius;
69 | }
70 | if (!self.buttonRadius) {
71 | self.buttonRadius = DefaultButtonRadius;
72 | }
73 | if (!self.animationDuration) {
74 | self.animationDuration = DefaultAnimationDuration;
75 | }
76 | if (!self.dimBackgroundLevel) {
77 | self.dimBackgroundLevel = DefaultDimmedLevel;
78 | }
79 | if (!self.title) {
80 | self.title = DefaultTitle;
81 | }
82 | if (!self.message) {
83 | self.message = DefaultMessage;
84 | }
85 | if (!self.otherButtonTitle) {
86 | self.otherButtonTitle = DefaultOtherTitle;
87 | }
88 | if (!self.cancelButtonTitle) {
89 | self.cancelButtonTitle = DefaultCancelTitle;
90 | }
91 | if (!self.iconName) {
92 | self.iconName = DefaultIcon;
93 | }
94 | if (!self.imgName) {
95 | self.imgName = DefaultImage;
96 | }
97 | }
98 |
99 | #pragma mark - Popup Build
100 | - (void) setPopup {
101 | [self initialize];
102 | self.customView = [[[NSBundle mainBundle] loadNibNamed:@"CustomPopup" owner:nil options:nil] firstObject];
103 | self.customView.frame = CGRectMake(0, 0, self.view.bounds.size.width-(self.leftMargin+self.rightMargin), self.view.bounds.size.height-(self.topMargin+self.bottomMargin));
104 | self.customView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
105 | self.customView.center = self.view.center;
106 | self.customView.layer.cornerRadius = self.cornerRadius;
107 | [self setBlurredBackground];
108 | [self setupLabels];
109 | [self setupButtons];
110 | [self setupImages];
111 | }
112 |
113 | #pragma mark - Blur Background
114 | - (void) setBlurredBackground {
115 | if (!UIAccessibilityIsReduceTransparencyEnabled() && self.blurBackground) {
116 | UIBlurEffect *burrEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark];
117 | self.blurBG = [[UIVisualEffectView alloc] initWithEffect:burrEffect];
118 | self.blurBG.frame = self.view.bounds;
119 | self.blurBG.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
120 | if (self.dismissOnBackgroundTap) {
121 | UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(hidePopup)];
122 | tapGesture.numberOfTapsRequired = 1;
123 | [self.blurBG addGestureRecognizer:tapGesture];
124 | }
125 | [self.view addSubview:self.blurBG];
126 | } else {
127 | [self setDimBackground];
128 | }
129 | }
130 |
131 | #pragma mark - Dim Background
132 | - (void) setDimBackground {
133 | self.dimBG = [[UIView alloc]initWithFrame:self.view.bounds];
134 | self.dimBG.alpha = self.dimBackgroundLevel;
135 | self.dimBG.backgroundColor = [UIColor blackColor];
136 | self.dimBG.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
137 | if (self.dismissOnBackgroundTap) {
138 | UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(hidePopup)];
139 | tapGesture.numberOfTapsRequired = 1;
140 | [self.dimBG addGestureRecognizer:tapGesture];
141 | }
142 | [self.view addSubview:self.dimBG];
143 | }
144 |
145 | #pragma mark - Setup Labels
146 | - (void) setupLabels {
147 | self.customView.titleLabel.text = self.title;
148 | self.customView.messageLabel.text = self.message;
149 | }
150 |
151 | #pragma mark - Setup Buttons
152 | - (void) setupButtons {
153 | [self.customView.cancelButton setTitle:self.cancelButtonTitle forState:UIControlStateNormal];
154 | [self.customView.otherButton setTitle:self.otherButtonTitle forState:UIControlStateNormal];
155 |
156 | self.customView.otherButton.layer.cornerRadius = self.buttonRadius;
157 | self.customView.cancelButton.layer.cornerRadius = self.buttonRadius;
158 |
159 | [self.customView.otherButton addTarget:self action:@selector(otherButtonAction) forControlEvents:UIControlEventTouchUpInside];
160 | [self.customView.cancelButton addTarget:self action:@selector(cancelButtonAction) forControlEvents:UIControlEventTouchUpInside];
161 | }
162 |
163 | #pragma mark - Setup Images
164 | - (void) setupImages {
165 | self.customView.iconView.image = [UIImage imageNamed:self.iconName];
166 | self.customView.imgView.image = [UIImage imageNamed:self.imgName];
167 | }
168 |
169 | #pragma mark - Actions
170 | - (void) otherButtonAction {
171 | [_delegate otherButtonAction:self.customView button:self.customView.otherButton];
172 | }
173 |
174 | - (void) cancelButtonAction {
175 | [_delegate cancelButtonAction:self.customView button:self.customView.cancelButton];
176 | }
177 |
178 | #pragma mark - Hide/Show Methods
179 | - (void) showPopup {
180 | [self setPopup];
181 | [self animateIn];
182 | }
183 |
184 | - (void) hidePopup {
185 | [self animateOut];
186 | }
187 |
188 | #pragma mark - Animations
189 | - (void) animateIn {
190 | switch (self.inAnimation) {
191 | case 1:
192 | {
193 | self.customView.frame = CGRectOffset(self.customView.frame, 0, -self.view.center.y);
194 | [self.view addSubview:self.customView];
195 | [UIView animateWithDuration:self.animationDuration animations:^{
196 | self.customView.frame = CGRectOffset(self.customView.frame, 0, self.view.center.y);
197 | }];
198 | }
199 | break;
200 | case 2:
201 | {
202 | self.customView.frame = CGRectOffset(self.customView.frame, 0, WIN_HEIGHT+self.view.center.y);
203 | [self.view addSubview:self.customView];
204 | [UIView animateWithDuration:self.animationDuration animations:^{
205 | self.customView.frame = CGRectOffset(self.customView.frame, 0, -WIN_HEIGHT-self.view.center.y);
206 | }];
207 | }
208 | break;
209 | case 3:
210 | {
211 | self.customView.frame = CGRectOffset(self.customView.frame, -self.view.center.x, 0);
212 | [self.view addSubview:self.customView];
213 | [UIView animateWithDuration:self.animationDuration animations:^{
214 | self.customView.frame = CGRectOffset(self.customView.frame, self.view.center.x, 0);
215 | }];
216 | }
217 | break;
218 | case 4:
219 | {
220 | self.customView.frame = CGRectOffset(self.customView.frame, WIN_WIDTH+self.view.center.x, 0);
221 | [self.view addSubview:self.customView];
222 | [UIView animateWithDuration:self.animationDuration animations:^{
223 | self.customView.frame = CGRectOffset(self.customView.frame, -WIN_WIDTH-self.view.center.x, 0);
224 | }];
225 | }
226 | break;
227 | default:
228 | {
229 | self.customView.transform = CGAffineTransformMakeScale(0.5, 0.5);
230 | [self.view addSubview:self.customView];
231 | [UIView animateWithDuration:self.animationDuration animations:^{
232 | self.customView.transform = CGAffineTransformIdentity;
233 | }];
234 | }
235 | break;
236 | }
237 | }
238 |
239 | - (void) animateOut {
240 | switch (self.outAnimation) {
241 | case 1:
242 | {
243 | [UIView animateWithDuration:self.animationDuration animations:^{
244 | self.customView.frame = CGRectOffset(self.customView.frame, 0, -self.view.center.y);
245 | [self.view layoutIfNeeded];
246 | self.customView.alpha = 0;
247 | self.dimBG.alpha = 0;
248 | self.blurBG.alpha = 0;
249 | } completion:^(BOOL finished) {
250 | [self removeFromView];
251 | }];
252 | }
253 | break;
254 | case 2:
255 | {
256 | [UIView animateWithDuration:self.animationDuration animations:^{
257 | self.customView.frame = CGRectOffset(self.customView.frame, 0, WIN_HEIGHT+self.view.center.y);
258 | [self.view layoutIfNeeded];
259 | self.customView.alpha = 0;
260 | self.dimBG.alpha = 0;
261 | self.blurBG.alpha = 0;
262 | } completion:^(BOOL finished) {
263 | [self removeFromView];
264 | }];
265 | }
266 | break;
267 | case 3:
268 | {
269 | [UIView animateWithDuration:self.animationDuration animations:^{
270 | self.customView.frame = CGRectOffset(self.customView.frame, -WIN_WIDTH-self.view.center.x, 0);
271 | [self.view layoutIfNeeded];
272 | self.customView.alpha = 0;
273 | self.dimBG.alpha = 0;
274 | self.blurBG.alpha = 0;
275 | } completion:^(BOOL finished) {
276 | [self removeFromView];
277 | }];
278 | }
279 | break;
280 | case 4:
281 | {
282 | [UIView animateWithDuration:self.animationDuration animations:^{
283 | self.customView.frame = CGRectOffset(self.customView.frame, WIN_WIDTH+self.view.center.x, 0);
284 | [self.view layoutIfNeeded];
285 | self.customView.alpha = 0;
286 | self.dimBG.alpha = 0;
287 | self.blurBG.alpha = 0;
288 | } completion:^(BOOL finished) {
289 | [self removeFromView];
290 | }];
291 | }
292 | break;
293 | default:
294 | {
295 | [UIView animateWithDuration:self.animationDuration animations:^{
296 | self.customView.transform = CGAffineTransformMakeScale(1.5, 1.5);
297 | [self.view layoutIfNeeded];
298 | self.customView.alpha = 0;
299 | self.dimBG.alpha = 0;
300 | self.blurBG.alpha = 0;
301 | } completion:^(BOOL finished) {
302 | [self removeFromView];
303 | }];
304 | }
305 | break;
306 | }
307 | }
308 |
309 | - (void) removeFromView {
310 | [self.customView removeFromSuperview];
311 | [self.dimBG removeFromSuperview];
312 | [self.blurBG removeFromSuperview];
313 |
314 | [self cleanCode];
315 | }
316 |
317 | #pragma mark - Cleaning
318 | - (void) cleanCode {
319 | self.customView = nil;
320 | self.dimBG = nil;
321 | self.blurBG = nil;
322 | }
323 |
324 | @end
325 |
--------------------------------------------------------------------------------
/RDPopupExample.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 48;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 9BC832DC1F7BACC300ED0FE2 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC832DB1F7BACC300ED0FE2 /* AppDelegate.m */; };
11 | 9BC832DF1F7BACC300ED0FE2 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC832DE1F7BACC300ED0FE2 /* ViewController.m */; };
12 | 9BC832E21F7BACC300ED0FE2 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9BC832E01F7BACC300ED0FE2 /* Main.storyboard */; };
13 | 9BC832E41F7BACC300ED0FE2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9BC832E31F7BACC300ED0FE2 /* Assets.xcassets */; };
14 | 9BC832E71F7BACC300ED0FE2 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9BC832E51F7BACC300ED0FE2 /* LaunchScreen.storyboard */; };
15 | 9BC832EA1F7BACC300ED0FE2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC832E91F7BACC300ED0FE2 /* main.m */; };
16 | 9BC832F31F7BAD7A00ED0FE2 /* RDPopup.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC832F21F7BAD7A00ED0FE2 /* RDPopup.m */; };
17 | 9BC832F71F7BAD9F00ED0FE2 /* CustomPopup.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC832F61F7BAD9F00ED0FE2 /* CustomPopup.m */; };
18 | 9BC832F91F7BADA700ED0FE2 /* CustomPopup.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9BC832F81F7BADA700ED0FE2 /* CustomPopup.xib */; };
19 | /* End PBXBuildFile section */
20 |
21 | /* Begin PBXFileReference section */
22 | 9BC832D71F7BACC300ED0FE2 /* RDPopupExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RDPopupExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
23 | 9BC832DA1F7BACC300ED0FE2 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
24 | 9BC832DB1F7BACC300ED0FE2 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
25 | 9BC832DD1F7BACC300ED0FE2 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
26 | 9BC832DE1F7BACC300ED0FE2 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
27 | 9BC832E11F7BACC300ED0FE2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
28 | 9BC832E31F7BACC300ED0FE2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
29 | 9BC832E61F7BACC300ED0FE2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
30 | 9BC832E81F7BACC300ED0FE2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
31 | 9BC832E91F7BACC300ED0FE2 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
32 | 9BC832F11F7BAD7A00ED0FE2 /* RDPopup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RDPopup.h; sourceTree = ""; };
33 | 9BC832F21F7BAD7A00ED0FE2 /* RDPopup.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RDPopup.m; sourceTree = ""; };
34 | 9BC832F51F7BAD9F00ED0FE2 /* CustomPopup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CustomPopup.h; sourceTree = ""; };
35 | 9BC832F61F7BAD9F00ED0FE2 /* CustomPopup.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CustomPopup.m; sourceTree = ""; };
36 | 9BC832F81F7BADA700ED0FE2 /* CustomPopup.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CustomPopup.xib; sourceTree = ""; };
37 | 9BC832FA1F7BBBD700ED0FE2 /* RDPopupProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RDPopupProtocol.h; sourceTree = ""; };
38 | /* End PBXFileReference section */
39 |
40 | /* Begin PBXFrameworksBuildPhase section */
41 | 9BC832D41F7BACC300ED0FE2 /* Frameworks */ = {
42 | isa = PBXFrameworksBuildPhase;
43 | buildActionMask = 2147483647;
44 | files = (
45 | );
46 | runOnlyForDeploymentPostprocessing = 0;
47 | };
48 | /* End PBXFrameworksBuildPhase section */
49 |
50 | /* Begin PBXGroup section */
51 | 9BC832CE1F7BACC300ED0FE2 = {
52 | isa = PBXGroup;
53 | children = (
54 | 9BC832D91F7BACC300ED0FE2 /* RDPopupExample */,
55 | 9BC832D81F7BACC300ED0FE2 /* Products */,
56 | );
57 | sourceTree = "";
58 | };
59 | 9BC832D81F7BACC300ED0FE2 /* Products */ = {
60 | isa = PBXGroup;
61 | children = (
62 | 9BC832D71F7BACC300ED0FE2 /* RDPopupExample.app */,
63 | );
64 | name = Products;
65 | sourceTree = "";
66 | };
67 | 9BC832D91F7BACC300ED0FE2 /* RDPopupExample */ = {
68 | isa = PBXGroup;
69 | children = (
70 | 9BC832F01F7BAD5600ED0FE2 /* RDPopup */,
71 | 9BC832F41F7BAD9100ED0FE2 /* CustomPopup */,
72 | 9BC832DA1F7BACC300ED0FE2 /* AppDelegate.h */,
73 | 9BC832DB1F7BACC300ED0FE2 /* AppDelegate.m */,
74 | 9BC832DD1F7BACC300ED0FE2 /* ViewController.h */,
75 | 9BC832DE1F7BACC300ED0FE2 /* ViewController.m */,
76 | 9BC832E01F7BACC300ED0FE2 /* Main.storyboard */,
77 | 9BC832E31F7BACC300ED0FE2 /* Assets.xcassets */,
78 | 9BC832E51F7BACC300ED0FE2 /* LaunchScreen.storyboard */,
79 | 9BC832E81F7BACC300ED0FE2 /* Info.plist */,
80 | 9BC832E91F7BACC300ED0FE2 /* main.m */,
81 | );
82 | path = RDPopupExample;
83 | sourceTree = "";
84 | };
85 | 9BC832F01F7BAD5600ED0FE2 /* RDPopup */ = {
86 | isa = PBXGroup;
87 | children = (
88 | 9BC832F11F7BAD7A00ED0FE2 /* RDPopup.h */,
89 | 9BC832F21F7BAD7A00ED0FE2 /* RDPopup.m */,
90 | 9BC832FA1F7BBBD700ED0FE2 /* RDPopupProtocol.h */,
91 | );
92 | path = RDPopup;
93 | sourceTree = "";
94 | };
95 | 9BC832F41F7BAD9100ED0FE2 /* CustomPopup */ = {
96 | isa = PBXGroup;
97 | children = (
98 | 9BC832F51F7BAD9F00ED0FE2 /* CustomPopup.h */,
99 | 9BC832F61F7BAD9F00ED0FE2 /* CustomPopup.m */,
100 | 9BC832F81F7BADA700ED0FE2 /* CustomPopup.xib */,
101 | );
102 | path = CustomPopup;
103 | sourceTree = "";
104 | };
105 | /* End PBXGroup section */
106 |
107 | /* Begin PBXNativeTarget section */
108 | 9BC832D61F7BACC300ED0FE2 /* RDPopupExample */ = {
109 | isa = PBXNativeTarget;
110 | buildConfigurationList = 9BC832ED1F7BACC300ED0FE2 /* Build configuration list for PBXNativeTarget "RDPopupExample" */;
111 | buildPhases = (
112 | 9BC832D31F7BACC300ED0FE2 /* Sources */,
113 | 9BC832D41F7BACC300ED0FE2 /* Frameworks */,
114 | 9BC832D51F7BACC300ED0FE2 /* Resources */,
115 | );
116 | buildRules = (
117 | );
118 | dependencies = (
119 | );
120 | name = RDPopupExample;
121 | productName = RDPopupExample;
122 | productReference = 9BC832D71F7BACC300ED0FE2 /* RDPopupExample.app */;
123 | productType = "com.apple.product-type.application";
124 | };
125 | /* End PBXNativeTarget section */
126 |
127 | /* Begin PBXProject section */
128 | 9BC832CF1F7BACC300ED0FE2 /* Project object */ = {
129 | isa = PBXProject;
130 | attributes = {
131 | LastUpgradeCheck = 0900;
132 | ORGANIZATIONNAME = "Raj Dhakate";
133 | TargetAttributes = {
134 | 9BC832D61F7BACC300ED0FE2 = {
135 | CreatedOnToolsVersion = 9.0;
136 | ProvisioningStyle = Manual;
137 | };
138 | };
139 | };
140 | buildConfigurationList = 9BC832D21F7BACC300ED0FE2 /* Build configuration list for PBXProject "RDPopupExample" */;
141 | compatibilityVersion = "Xcode 8.0";
142 | developmentRegion = en;
143 | hasScannedForEncodings = 0;
144 | knownRegions = (
145 | en,
146 | Base,
147 | );
148 | mainGroup = 9BC832CE1F7BACC300ED0FE2;
149 | productRefGroup = 9BC832D81F7BACC300ED0FE2 /* Products */;
150 | projectDirPath = "";
151 | projectRoot = "";
152 | targets = (
153 | 9BC832D61F7BACC300ED0FE2 /* RDPopupExample */,
154 | );
155 | };
156 | /* End PBXProject section */
157 |
158 | /* Begin PBXResourcesBuildPhase section */
159 | 9BC832D51F7BACC300ED0FE2 /* Resources */ = {
160 | isa = PBXResourcesBuildPhase;
161 | buildActionMask = 2147483647;
162 | files = (
163 | 9BC832E71F7BACC300ED0FE2 /* LaunchScreen.storyboard in Resources */,
164 | 9BC832E41F7BACC300ED0FE2 /* Assets.xcassets in Resources */,
165 | 9BC832E21F7BACC300ED0FE2 /* Main.storyboard in Resources */,
166 | 9BC832F91F7BADA700ED0FE2 /* CustomPopup.xib in Resources */,
167 | );
168 | runOnlyForDeploymentPostprocessing = 0;
169 | };
170 | /* End PBXResourcesBuildPhase section */
171 |
172 | /* Begin PBXSourcesBuildPhase section */
173 | 9BC832D31F7BACC300ED0FE2 /* Sources */ = {
174 | isa = PBXSourcesBuildPhase;
175 | buildActionMask = 2147483647;
176 | files = (
177 | 9BC832DF1F7BACC300ED0FE2 /* ViewController.m in Sources */,
178 | 9BC832EA1F7BACC300ED0FE2 /* main.m in Sources */,
179 | 9BC832F31F7BAD7A00ED0FE2 /* RDPopup.m in Sources */,
180 | 9BC832F71F7BAD9F00ED0FE2 /* CustomPopup.m in Sources */,
181 | 9BC832DC1F7BACC300ED0FE2 /* AppDelegate.m in Sources */,
182 | );
183 | runOnlyForDeploymentPostprocessing = 0;
184 | };
185 | /* End PBXSourcesBuildPhase section */
186 |
187 | /* Begin PBXVariantGroup section */
188 | 9BC832E01F7BACC300ED0FE2 /* Main.storyboard */ = {
189 | isa = PBXVariantGroup;
190 | children = (
191 | 9BC832E11F7BACC300ED0FE2 /* Base */,
192 | );
193 | name = Main.storyboard;
194 | sourceTree = "";
195 | };
196 | 9BC832E51F7BACC300ED0FE2 /* LaunchScreen.storyboard */ = {
197 | isa = PBXVariantGroup;
198 | children = (
199 | 9BC832E61F7BACC300ED0FE2 /* Base */,
200 | );
201 | name = LaunchScreen.storyboard;
202 | sourceTree = "";
203 | };
204 | /* End PBXVariantGroup section */
205 |
206 | /* Begin XCBuildConfiguration section */
207 | 9BC832EB1F7BACC300ED0FE2 /* Debug */ = {
208 | isa = XCBuildConfiguration;
209 | buildSettings = {
210 | ALWAYS_SEARCH_USER_PATHS = NO;
211 | CLANG_ANALYZER_NONNULL = YES;
212 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
213 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
214 | CLANG_CXX_LIBRARY = "libc++";
215 | CLANG_ENABLE_MODULES = YES;
216 | CLANG_ENABLE_OBJC_ARC = YES;
217 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
218 | CLANG_WARN_BOOL_CONVERSION = YES;
219 | CLANG_WARN_COMMA = YES;
220 | CLANG_WARN_CONSTANT_CONVERSION = YES;
221 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
222 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
223 | CLANG_WARN_EMPTY_BODY = YES;
224 | CLANG_WARN_ENUM_CONVERSION = YES;
225 | CLANG_WARN_INFINITE_RECURSION = YES;
226 | CLANG_WARN_INT_CONVERSION = YES;
227 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
228 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
229 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
230 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
231 | CLANG_WARN_STRICT_PROTOTYPES = YES;
232 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
233 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
234 | CLANG_WARN_UNREACHABLE_CODE = YES;
235 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
236 | CODE_SIGN_IDENTITY = "iPhone Developer";
237 | COPY_PHASE_STRIP = NO;
238 | DEBUG_INFORMATION_FORMAT = dwarf;
239 | ENABLE_STRICT_OBJC_MSGSEND = YES;
240 | ENABLE_TESTABILITY = YES;
241 | GCC_C_LANGUAGE_STANDARD = gnu11;
242 | GCC_DYNAMIC_NO_PIC = NO;
243 | GCC_NO_COMMON_BLOCKS = YES;
244 | GCC_OPTIMIZATION_LEVEL = 0;
245 | GCC_PREPROCESSOR_DEFINITIONS = (
246 | "DEBUG=1",
247 | "$(inherited)",
248 | );
249 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
250 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
251 | GCC_WARN_UNDECLARED_SELECTOR = YES;
252 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
253 | GCC_WARN_UNUSED_FUNCTION = YES;
254 | GCC_WARN_UNUSED_VARIABLE = YES;
255 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
256 | MTL_ENABLE_DEBUG_INFO = YES;
257 | ONLY_ACTIVE_ARCH = YES;
258 | SDKROOT = iphoneos;
259 | };
260 | name = Debug;
261 | };
262 | 9BC832EC1F7BACC300ED0FE2 /* Release */ = {
263 | isa = XCBuildConfiguration;
264 | buildSettings = {
265 | ALWAYS_SEARCH_USER_PATHS = NO;
266 | CLANG_ANALYZER_NONNULL = YES;
267 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
268 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
269 | CLANG_CXX_LIBRARY = "libc++";
270 | CLANG_ENABLE_MODULES = YES;
271 | CLANG_ENABLE_OBJC_ARC = YES;
272 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
273 | CLANG_WARN_BOOL_CONVERSION = YES;
274 | CLANG_WARN_COMMA = YES;
275 | CLANG_WARN_CONSTANT_CONVERSION = YES;
276 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
277 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
278 | CLANG_WARN_EMPTY_BODY = YES;
279 | CLANG_WARN_ENUM_CONVERSION = YES;
280 | CLANG_WARN_INFINITE_RECURSION = YES;
281 | CLANG_WARN_INT_CONVERSION = YES;
282 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
283 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
284 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
285 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
286 | CLANG_WARN_STRICT_PROTOTYPES = YES;
287 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
288 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
289 | CLANG_WARN_UNREACHABLE_CODE = YES;
290 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
291 | CODE_SIGN_IDENTITY = "iPhone Developer";
292 | COPY_PHASE_STRIP = NO;
293 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
294 | ENABLE_NS_ASSERTIONS = NO;
295 | ENABLE_STRICT_OBJC_MSGSEND = YES;
296 | GCC_C_LANGUAGE_STANDARD = gnu11;
297 | GCC_NO_COMMON_BLOCKS = YES;
298 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
299 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
300 | GCC_WARN_UNDECLARED_SELECTOR = YES;
301 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
302 | GCC_WARN_UNUSED_FUNCTION = YES;
303 | GCC_WARN_UNUSED_VARIABLE = YES;
304 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
305 | MTL_ENABLE_DEBUG_INFO = NO;
306 | SDKROOT = iphoneos;
307 | VALIDATE_PRODUCT = YES;
308 | };
309 | name = Release;
310 | };
311 | 9BC832EE1F7BACC300ED0FE2 /* Debug */ = {
312 | isa = XCBuildConfiguration;
313 | buildSettings = {
314 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
315 | CODE_SIGN_STYLE = Manual;
316 | DEVELOPMENT_TEAM = "";
317 | INFOPLIST_FILE = RDPopupExample/Info.plist;
318 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
319 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
320 | PRODUCT_BUNDLE_IDENTIFIER = com.webdior.RDPopupExample;
321 | PRODUCT_NAME = "$(TARGET_NAME)";
322 | PROVISIONING_PROFILE_SPECIFIER = "";
323 | TARGETED_DEVICE_FAMILY = "1,2";
324 | };
325 | name = Debug;
326 | };
327 | 9BC832EF1F7BACC300ED0FE2 /* Release */ = {
328 | isa = XCBuildConfiguration;
329 | buildSettings = {
330 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
331 | CODE_SIGN_STYLE = Manual;
332 | DEVELOPMENT_TEAM = "";
333 | INFOPLIST_FILE = RDPopupExample/Info.plist;
334 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
335 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
336 | PRODUCT_BUNDLE_IDENTIFIER = com.webdior.RDPopupExample;
337 | PRODUCT_NAME = "$(TARGET_NAME)";
338 | PROVISIONING_PROFILE_SPECIFIER = "";
339 | TARGETED_DEVICE_FAMILY = "1,2";
340 | };
341 | name = Release;
342 | };
343 | /* End XCBuildConfiguration section */
344 |
345 | /* Begin XCConfigurationList section */
346 | 9BC832D21F7BACC300ED0FE2 /* Build configuration list for PBXProject "RDPopupExample" */ = {
347 | isa = XCConfigurationList;
348 | buildConfigurations = (
349 | 9BC832EB1F7BACC300ED0FE2 /* Debug */,
350 | 9BC832EC1F7BACC300ED0FE2 /* Release */,
351 | );
352 | defaultConfigurationIsVisible = 0;
353 | defaultConfigurationName = Release;
354 | };
355 | 9BC832ED1F7BACC300ED0FE2 /* Build configuration list for PBXNativeTarget "RDPopupExample" */ = {
356 | isa = XCConfigurationList;
357 | buildConfigurations = (
358 | 9BC832EE1F7BACC300ED0FE2 /* Debug */,
359 | 9BC832EF1F7BACC300ED0FE2 /* Release */,
360 | );
361 | defaultConfigurationIsVisible = 0;
362 | defaultConfigurationName = Release;
363 | };
364 | /* End XCConfigurationList section */
365 | };
366 | rootObject = 9BC832CF1F7BACC300ED0FE2 /* Project object */;
367 | }
368 |
--------------------------------------------------------------------------------