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

UITextField Toast (Xcode7.2 ios9.2) #76

Closed
StevenGardnerGMJ opened this issue Dec 25, 2015 · 0 comments
Closed

UITextField Toast (Xcode7.2 ios9.2) #76

StevenGardnerGMJ opened this issue Dec 25, 2015 · 0 comments

Comments

@StevenGardnerGMJ
Copy link

when I use "UITextField" keyboard show, the toast was covered by "keyboard"!
My test code as follows:


  • (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"test Toast";
    self.view.backgroundColor = [UIColor whiteColor];

    tt = [[UITextField alloc] init];
    tt.frame = CGRectMake(50, 100, 200, 40);
    tt.placeholder = @"UItoasttestWork";
    // tt.backgroundColor = [UIColor lightGrayColor];

    [self.view addSubview:tt];
    UIButton *toastBtn = [[UIButton alloc] init];
    toastBtn.frame =CGRectMake(255, 100, 60, 40);
    [toastBtn setTitle:@"Toast" forState:UIControlStateNormal];
    [toastBtn setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
    [toastBtn addTarget:self action:@selector(zButtonClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:toastBtn];

    UITapGestureRecognizer *tapGeser = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(keyboardHidden:)];
    [self.view addGestureRecognizer:tapGeser];

}
-(void)zButtonClick:(UIButton *)btn{
[self.navigationController.view makeToast:@"This is a piece of toast"];
}


Any help will be appreciated!

@StevenGardnerGMJ StevenGardnerGMJ changed the title UITextField Toast UITextField Toast (Xcode7.2 ios9.2) Dec 25, 2015
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

2 participants