草庐IT

notification-bar

全部标签

IOS/ Storyboard/自动布局 : Center round button under horizontal bar

这应该非常简单,但不知何故,自动布局对我来说却非常复杂。我有一个水平条形按钮。我想在其下方居中放置一个圆形信息图标。自动布局一直试图将圆形按钮拉伸(stretch)成椭圆形,而不是将其从左到右居中,如下所示:以上是以下约束的结果,这些约束应该起作用但不起作用。任何人都可以告诉我添加正确的约束来完成这个简单的任务。谢谢。 最佳答案 如果图像被拉伸(stretch),则将其contentMode设置为aspectFit或aspectFill。完成后,您可以为图像添加约束,使其和登录按钮共享垂直中心。

iOS推送通知: How does an app get notified about a push notification,处于事件状态时?

我有一个应用程序在事件状态下运行。突然收到推送通知,应用程序如何收到通知,如何处理? 最佳答案 您可以在appledocumentation中阅读相关内容.您需要在AppDelegate中使用didReceiveNotificationRequest:withContentHandler:。之后,您可以向用户显示通知。如果您想在事件状态下显示通知,您可以在应用程序中显示警报或使用系统横幅。 关于iOS推送通知:Howdoesanappgetnotifiedaboutapushnotifi

iOS 10.3 到 iOS 11 升级 : User stop receiving silent push notifications

我有很多用户提示说,当他们从iOS10.3.3迁移到昨天发布的iOS11时,他们停止接收静默推送通知。需要注意的是,如果我已经要求用户注册推送通知,我在NSUSerDefaults中有一个设置。我这样做:[[UIApplicationsharedApplication]registerUserNotificationSettings:settings];仅当用户之前没有被询问过。现在,如果用户在使用iOS10.3.3时已经注册了通知,并升级到iOS11,代码registerUserNotificationSettings:settings将永远不会被调用,直到他重新安装。这可能是个问题

ios - 境界 cocoa : How to add notification inside other notification block

在我的应用程序中,我注册了一个通知block,它本身必须注册另一个通知block。notificationToken=[self.appState.currentProjectaddNotificationBlock:^(BOOLdeleted,NSArray*changes,NSError*error){if(deleted){NSLog(@"Theobjectwasdeleted.");}elseif(error){NSLog(@"Anerroroccurred:%@",error);}else{boolfilterChanged=false;for(RLMPropertyChan

ios - 在 swift 5 中使用 UITabBar.appearance().bar 样式崩溃

我实现了“深色模式”,我需要将TabBar样式从默认更改为深色,或者相反。我的应用崩溃了!我该怎么办?2019-08-2821:42:57.276131+0200Score[1817:344811]*Terminatingappduetouncaughtexception'NSInvalidArgumentException',reason:'BarstylenotsupportedbyUITabBar.SupportedbarstylesareUIBarStyleDefaultandUIBarStyleBlack'*Firstthrowcallstack:(0x19ef4aab80x

iphone - Navigation Bar 后退按钮 Action 即使在按钮之后也执行

这道题看起来很简单,但我不知道哪里错了。我有一个导航栏我正在放置一个自定义导航栏后退按钮如下图所示,通过“粉红色”颜色执行操作我的代码如下://-------backbuttonstartUIImage*myImage1=[UIImageimageNamed:@"Back.png"];UIButton*myButton1=[UIButtonbuttonWithType:UIButtonTypeCustom];[myButton1setImage:myImage1forState:UIControlStateNormal];myButton1.showsTouchWhenHighligh

ios - 隐藏View的Navigation Bar push View是OK.but pop 可以看到黑条

SDK6.1,Target6.1,使用storyboardaView有一个UIButton。我使用Actionsegue[push]到bView当我点击这个按钮时,按下bView就可以了但是我弹出aView有一个后退栏,我该如何解决这个问题?aView.m-(void)viewWillAppear:(BOOL)animated{[superviewWillAppear:animated];[self.navigationController.navigationBarsetHidden:YES];}bView.m-(void)viewWillAppear:(BOOL)animated{

ios - Tab Bar Item 是一个灰色方 block

如您所见,只有一个大的灰色方block,而不是图像。我的Assets目录中有一张图片,我已经通过属性检查器对其进行了设置。图片是50x50px,我在文档中读到它可以是任何尺寸但不能大于96x96。屏幕截图如下。谢谢!1: 最佳答案 iOS7存在bug,未选中的tabbaritem总是灰色。试试这个:(在AppDelegate应用程序中添加:didFinishLaunchingWithOptions:)UITabBarItem*item1=self.tabBarController.tabBar.items[0];item1.imag

ios - 为什么 Notification 适用于 NSHourCalendarUnit 但不适用于 NSWeekCalendarUnit?

我不明白为什么LocalNotification可以完美地与NSHourCalendarUnit一起工作,但永远不会与NSWeekCalendarUnit和NSDayCalendarUnit一起工作,尽管它显示了正确的时间日志!!在设置weekday我需要它启动时,一定有什么东西是我遗漏的。它会是什么?请查看我的代码日志出来,以便您可以指导我正在做的错误:-(void)Monday{//9thNotificationEvery1:35NSCalendar*calendar=[NSCalendarcurrentCalendar];calendar.timeZone=[NSTimeZone

ios - UITabViewController : how to access the correct visible tab bar (selectedViewController showing wrong results)

使用UITabBarControllerDelegate方法:-(void)tabBarController:(UITabBarController*)tabBarControllerdidSelectViewController:(UIViewController*)viewController{//Iwanttocheckthecurrentlydisplayedviewcontrollerandtheselectedonetodecidewhattodoif(self.selectedViewController==self.viewController1){if(viewCon