ios – 在Obejctive c中显示键盘上方的吐司[复制]

ios – 在Obejctive c中显示键盘上方的吐司[复制],第1张

概述参见英文答案 > Position MBProgressHUD at the Bottom/Top of the screen                                    5个 我编写了一个在UIVIewController上显示toast的函数.吐司功能如下 -(void)showToast:(NSString*)string{ MBProgressHUD * 参见英文答案 > Position MBProgressHUD at the Bottom/Top of the screen                                    5个
我编写了一个在UIVIEwController上显示toast的函数.吐司功能如下

-(voID)showToast:(Nsstring*)string{    MBProgressHUD *hud;    hud = [MBProgressHUD showHUDAddedTo:self.vIEw animated:YES];    hud.mode = MBProgressHUDModeText;    hud.labelText = string;    hud.margin = 10.f;    hud.yOffset = 150.f;    hud.removeFromSuperVIEwOnHIDe = YES;    hud.userInteractionEnabled = NO;    [hud hIDe:YES afterDelay:2];}

现在问题是我的toast消息隐藏在键盘后面.谁能告诉我如何在键盘高度上方显示吐司?

解决方法 类似的问题与答案在这里:
Position MBProgressHUD at the Bottom/Top of the screen

简而言之,使用MBProgressHUD的yOffset属性来更改其Y位置.

总结

以上是内存溢出为你收集整理的ios – 在Obejctive c中显示键盘上方的吐司[复制]全部内容,希望文章能够帮你解决ios – 在Obejctive c中显示键盘上方的吐司[复制]所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1028462.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存