-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The alert view not showing up at all #39
Comments
Same Problem here...I just does´t come up! |
hey @chrizstone and @sharanyakm - does the project in the repo work for you? in case it does, can you share some more of your code? are you trying to launch the alert view in viewDidLoad? |
Same here. - (IBAction)plusProjectButtonPressed:(id)sender {
CustomIOS7AlertView *newProjectAlert = [[CustomIOS7AlertView alloc] init];
[newProjectAlert setButtonTitles:[NSMutableArray arrayWithObjects:@"Cancel", @"Create", nil]];
[newProjectAlert setUseMotionEffects:TRUE];
BLNewProjectContainedView *newProject = [[BLNewProjectContainedView alloc] init];
[newProjectAlert setContainerView:newProject];
[newProjectAlert show];
}; BLNewProjectContainedView is inherited from UIView and contains only one UITextField |
I've found that if I use the sample project and fire on the launchDialog button everything looks great. However, I'm trying to fire on a condition. If I remove the launchDialog and add this code (with proper initialization) |
I have used the same code. Added the delegate and imported the header file. Still Alert not showing up
(IBAction)contactUs:(id)sender
{
// Here we need to pass a full frame
CustomIOS7AlertView *alertView = [[CustomIOS7AlertView alloc] init];
[alertView setContainerView:[self createDemoView]];
[alertView setBackgroundColor:[UIColor blackColor]];
[alertView setButtonTitles:[NSMutableArray arrayWithObjects:@"Close", nil]];
[alertView setDelegate:self];
[alertView setOnButtonTouchUpInside:^(CustomIOS7AlertView *alertView, int buttonIndex) {
NSLog(@"Block: Button at position %d is clicked on alertView %d.", buttonIndex, [alertView tag]);
[alertView close];
}];
//[alertView setUseMotionEffects:true];
// And launch the dialog
[alertView show];
}
(void)customIOS7dialogButtonTouchUpInside: (CustomIOS7AlertView *)alertView clickedButtonAtIndex: (NSInteger)buttonIndex
{
[alertView close];
}
(UIView *)createDemoView
{
UIView *demoView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 290, 400)];
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 300, 150)];
label.backgroundColor = [UIColor clearColor];
label.font = [UIFont fontWithName:@"helveticaNeue-Bold" size:13];
label.textColor = [UIColor grayColor];
label.numberOfLines = 12;
label.lineBreakMode = NSLineBreakByWordWrapping;
label.text = [NSString stringWithFormat:@"ssdmfbs shbf ,jsdhf b,shf b,shdfb ,sdfb ,sdfb ,sdjfb ,sdjfb,djksfbdjksf.skjdf.ksjdfh.ksjfdh.skjdfh.skjdfh.skjdfh"];
[demoView addSubview:label];
return demoView;
}
The text was updated successfully, but these errors were encountered: