Skip to content

Commit 38cbe59

Browse files
Update readme
1 parent 584c38e commit 38cbe59

1 file changed

Lines changed: 38 additions & 36 deletions

File tree

README.md

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Animated Alert View written in Swift but ported to Objective-C, which can be use
2323
SCLAlertViewBuilder *builder = [SCLAlertViewBuilder new]
2424
.addButtonWithActionBlock(@"Send", ^{ /*work here*/ });
2525
SCLAlertViewShowBuilder *showBuilder = [SCLAlertViewShowBuilder new]
26-
.style(Warning)
26+
.style(SCLAlertViewStyleWarning)
2727
.title(@"Title")
2828
.subTitle(@"Subtitle")
2929
.duration(0);
@@ -51,14 +51,14 @@ showBuilder.show(builder.alertView, self.window.rootViewController);
5151
});
5252
5353
SCLAlertViewBuilder *builder = [SCLAlertViewBuilder new]
54-
.showAnimationType(FadeIn)
55-
.hideAnimationType(FadeOut)
54+
.showAnimationType(SCLAlertViewShowAnimationFadeIn)
55+
.hideAnimationType(SCLAlertViewHideAnimationFadeOut)
5656
.shouldDismissOnTapOutside(NO)
5757
.addTextFieldWithBuilder(textField)
5858
.addButtonWithBuilder(doneButton);
5959
6060
SCLAlertViewShowBuilder *showBuilder = [SCLAlertViewShowBuilder new]
61-
.style(Custom)
61+
.style(SCLAlertViewStyleCustom)
6262
.image([SCLAlertViewStyleKit imageOfInfo])
6363
.color([UIColor blueColor])
6464
.title(title)
@@ -229,14 +229,14 @@ customView.backgroundColor = [UIColor redColor];
229229
//Dismiss on tap outside (Default is NO)
230230
alert.shouldDismissOnTapOutside = YES;
231231

232-
//Hide animation type (Default is FadeOut)
233-
alert.hideAnimationType = SlideOutToBottom;
232+
//Hide animation type (Default is SCLAlertViewHideAnimationFadeOut)
233+
alert.hideAnimationType = SCLAlertViewHideAnimationSlideOutToBottom;
234234

235-
//Show animation type (Default is SlideInFromTop)
236-
alert.showAnimationType = SlideInFromLeft;
235+
//Show animation type (Default is SCLAlertViewShowAnimationSlideInFromTop)
236+
alert.showAnimationType = SCLAlertViewShowAnimationSlideInFromLeft;
237237

238-
//Set background type (Default is Shadow)
239-
alert.backgroundType = Blur;
238+
//Set background type (Default is SCLAlertViewBackgroundShadow)
239+
alert.backgroundType = SCLAlertViewBackgroundBlur;
240240

241241
//Overwrite SCLAlertView (Buttons, top circle and borders) colors
242242
alert.customViewColor = [UIColor purpleColor];
@@ -277,51 +277,53 @@ alert.soundURL = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/right_an
277277
```Objective-C
278278
typedef NS_ENUM(NSInteger, SCLAlertViewStyle)
279279
{
280-
Success,
281-
Error,
282-
Notice,
283-
Warning,
284-
Info,
285-
Edit,
286-
Waiting,
287-
Question,
288-
Custom
280+
SCLAlertViewStyleSuccess,
281+
SCLAlertViewStyleError,
282+
SCLAlertViewStyleNotice,
283+
SCLAlertViewStyleWarning,
284+
SCLAlertViewStyleInfo,
285+
SCLAlertViewStyleEdit,
286+
SCLAlertViewStyleWaiting,
287+
SCLAlertViewStyleQuestion,
288+
SCLAlertViewStyleCustom
289289
};
290290
```
291291
####Alert View hide animation styles
292292
```Objective-C
293293
typedef NS_ENUM(NSInteger, SCLAlertViewHideAnimation)
294294
{
295-
FadeOut,
296-
SlideOutToBottom,
297-
SlideOutToTop,
298-
SlideOutToLeft,
299-
SlideOutToRight,
300-
SlideOutToCenter,
301-
SlideOutFromCenter
295+
SCLAlertViewHideAnimationFadeOut,
296+
SCLAlertViewHideAnimationSlideOutToBottom,
297+
SCLAlertViewHideAnimationSlideOutToTop,
298+
SCLAlertViewHideAnimationSlideOutToLeft,
299+
SCLAlertViewHideAnimationSlideOutToRight,
300+
SCLAlertViewHideAnimationSlideOutToCenter,
301+
SCLAlertViewHideAnimationSlideOutFromCenter,
302+
SCLAlertViewHideAnimationSimplyDisappear
302303
};
303304
```
304305
####Alert View show animation styles
305306
```Objective-C
306307
typedef NS_ENUM(NSInteger, SCLAlertViewShowAnimation)
307308
{
308-
FadeIn,
309-
SlideInFromBottom,
310-
SlideInFromTop,
311-
SlideInFromLeft,
312-
SlideInFromRight,
313-
SlideInFromCenter,
314-
SlideInToCenter
309+
SCLAlertViewShowAnimationFadeIn,
310+
SCLAlertViewShowAnimationSlideInFromBottom,
311+
SCLAlertViewShowAnimationSlideInFromTop,
312+
SCLAlertViewShowAnimationSlideInFromLeft,
313+
SCLAlertViewShowAnimationSlideInFromRight,
314+
SCLAlertViewShowAnimationSlideInFromCenter,
315+
SCLAlertViewShowAnimationSlideInToCenter,
316+
SCLAlertViewShowAnimationSimplyAppear
315317
};
316318
```
317319
318320
####Alert View background styles
319321
```Objective-C
320322
typedef NS_ENUM(NSInteger, SCLAlertViewBackground)
321323
{
322-
Shadow,
323-
Blur,
324-
Transparent
324+
SCLAlertViewBackgroundShadow,
325+
SCLAlertViewBackgroundBlur,
326+
SCLAlertViewBackgroundTransparent
325327
};
326328
```
327329

0 commit comments

Comments
 (0)