Comments (2)
You always will need a viewController, but you can use the root or the parent
UIViewController *viewController = [[[UIApplication sharedApplication] keyWindow] rootViewController];
or
UIViewController *viewController = self.parentViewController;
SCLAlertView *alert = [[SCLAlertView alloc] init];
[alert showSuccess: viewController title:@"Hello World" subTitle:@"This is a more descriptive text." closeButtonTitle:@"Done" duration:0.0f];```
from sclalertview.
oh,yaeh! thanks a lot!
from sclalertview.
Related Issues (20)
- UIStatusBarStyle always appears as 'UIStatusBarStyleDefault' HOT 9
- handleNavigationTransition Bug HOT 1
- UIStatusBarStyle always appears as 'UIStatusBarStyleDefault' HOT 1
- “durationTimer" should not be a constant, should be a property, or the first one to disappear when multiple prompt boxes appear will cancel the timer, causing the others not to disappear automatically. HOT 1
- Modify the frame of the customView. How to modify the frame of the alert dynamically HOT 2
- SCLAertView cannot be used in Shared Extension HOT 2
- How to hidden top image with OC? HOT 2
- Good day, as you can implement the verification key which is located on the website .txt document? Roughly speaking to make check on a key if the key is correct, then there is a start. HOT 1
- Nothing happens on show methods @ iOS 13 HOT 4
- 设置富文本后不居中显示了 变成了居左。 HOT 1
- alertView with textfield moves up twice(too much) when textfield become first responder and the keyboard shows HOT 2
- Is this used in nested? HOT 1
- SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindowWidth:300.0f]; self.username = @"zaxo"; self.password = @"pass"; UITextField *usernameTextField = [alert addTextField:@"username"]; UITextField *passwordTextField = [alert addTextField:@"password"]; passwordTextField.secureTextEntry = YES; [alert addButton:@"Login" actionBlock: ^(void){ BOOL isUsersEqual = [self.username isEqualToString:[self.usernameTextField text]]; BOOL isPasswordsEqual = [self.password isEqualToString:[self.passwordTextField text]]; if(isUsersEqual && isPasswordsEqual){ NSLog(@"Successful"); } else { NSLog(@"frailer"); } @@@@@@@@ Why I can't compile it I even have set the @Property (nonatomic, strong) NSString *username; in SCLALertView.m but I still errors do im doing anthing please can you help Tweak.xm:350:1: error: use of undeclared identifier 'self' self.username = @"zaxo";
- the property 'backgroundOpacity' can`t custom by myself ??? HOT 1
- Is this an SCLAlertView bug, or an Apple bug? HOT 1
- Bug with Keyboard on iPad in Landscape HOT 7
- Remove Popup icon HOT 1
- Cannot find ChangesLog for version 1.2.0 HOT 2
- iPad keyboard covered by alert HOT 7
- showCustom 的时候如何自定义 closeButton样式 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sclalertview.