Skip to content
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

Open
sharanyakm opened this issue Jan 30, 2014 · 4 comments
Open

The alert view not showing up at all #39

sharanyakm opened this issue Jan 30, 2014 · 4 comments

Comments

@sharanyakm
Copy link

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;
    }

@chrizstone
Copy link

Same Problem here...I just does´t come up!

@wimagguc
Copy link
Owner

wimagguc commented Feb 3, 2014

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?

@0xNSHuman
Copy link

Same here.
Using this code for creating AlertView:

- (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
And almost nothing happens, just a little more dark screen, but without Alert.

@ghost
Copy link

ghost commented Sep 16, 2014

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)
if(!didRunBefore)
{
NSLog(@"Should see alert view"); //Note : This works
[self launchDialog];
}
I don't see the alert view. I changed the launchDialog to -(void)launchDialog. Very mysterious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants