jjzjj

Appearance

全部标签

ios - 在 XCode 8.2/Swift 3.0 中更改状态栏样式(No "View controller-based status bar appearance")

我正在尝试修改状态栏的外观(将文本设为白色/将样式设置为“浅色”)。我设法通过将此添加到我的AppDelegate.swift文件来设置背景颜色:letstatWindow=UIApplication.shared.value(forKey:"statusBarWindow")as!UIViewletstatusBar=statWindow.subviews[0]asUIViewstatusBar.backgroundColor=UIColor(red:0/255.0,green:0/255.0,blue:0/255.0,alpha:1.0)但是,当我去更改状态栏文本的样式时,即使在“

ios - UITabBar.appearance().selectionIndicatorImage 设置的 UITabBarItem 背景在 iPhone X 上未对齐

代码:letsize=CGSize(width:tabBar.frame.width/CGFloat(TabBarItem.allValues.count),height:tabBar.frame.height)letimage=UIImage.image(color:Color.action,size:size)UITabBar.appearance().selectionIndicatorImage=image在普通设备上看起来像这样:在iPhoneX上是这样的:iPhoneX标签栏项目背景未对齐的原因是什么?更新1:将代码更改为如下所示后,它看起来更好,但它仍然是解决方法,因为图

html - "-webkit-appearance: none;"火狐等效?

我想知道是否有什么等同于:-webkit-appearance:none;forFirefox?我想要实现的目标:... 最佳答案 The-moz-appearanceCSSpropertyisusedinGecko(Firefox)todisplayanelementusingaplatform-nativestylingbasedontheoperatingsystem'stheme.来源:Mozilla 关于html-"-webkit-appearance:none;"火狐等效?,

ios - UINavigationBar Appearance on Modal Not Setting

我在我的appDelegate中使用以下代码来设置整个应用程序中UINavigationBar和状态栏的外观:[[UINavigationBarappearance]setTintColor:[UIColorwhiteColor]];[[UINavigationBarappearance]setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColorwhiteColor]}];[[UIApplicationsharedApplication]setStatusBarStyle:UIStatusBarStyleLightC

ios - UIAppearance setTranslucent error : Illegal property type, c for appearance setter, _installAppearanceSwizzleForSetter

试用iOS7:[[UINavigationBarappearance]setTranslucent:NO];出现崩溃和错误:***Terminatingappduetouncaughtexception'NSInvalidArgumentException',reason:'***Illegalpropertytype,cforappearancesetter,_installAppearanceSwizzleForSetter:'***Firstthrowcallstack:(0x16ad9b80x142e8b60x16ad7ab0x72163d0x724c340x169daca0x

ios - 不断收到 "Unbalanced calls to begin/end appearance transitions for <ViewController>"错误

我有一个几乎完美运行的应用程序。以下是我的应用程序的结构:Storyboard上共有6个ViewController。前3个ViewController是最重要的。初始ViewController具有“登录”和“注册”按钮。“登录”按钮以模态方式呈现登录ViewController,“注册”按钮以模态方式呈现注册ViewController。注册ViewController有3个字段用于用户名、密码和电子邮件,然后是一个“提交”按钮。提交按钮将数据提交到我的网络服务器,如果所有内容都成功提交,它会自行调用“performSegueWithIdentifier”方法。声明如下:[self

ios - "Unbalanced calls to begin/end appearance transitions for DetailViewController"当推送多个细节 View Controller 时

我有一个包含TableView的ViewController,可以选择表中的项目并适当创建详细ViewController。表中的项目表示可以具有与之关联的基于时间的触发器的项目,并且为每个项目安排了本地通知,如果本地通知过期时应用程序位于前台,则该项目的详细信息View是自动显示。当两个通知同时过期时,我会遇到一个问题,这会导致View无法正确显示,此外还会显示控制台日志:“对NNN开始/结束外观转换的不平衡调用”,其中NNN是我的详细ViewController。TableViewController创建如下:self.tableViewController=[[TableView

swift - Swift 中的外观代理/UI_APPEARANCE_SELECTOR?

Apple文档指出:ToparticipateintheappearanceproxyAPI,tagyourappearancepropertyselectorsinyourheaderwithUI_APPEARANCE_SELECTOR.在Objective-C中,可以像这样使用UI_APPEARANCE_SELECTOR注释属性:@property(nonatomic,strong)UIColor*foregroundColorUI_APPEARANCE_SELECTOR;我如何在Swift中做同样的事情? 最佳答案 将您的自定

iphone - iOS 5 : Curious about UIAppearance

在2011年技术演讲中,我看到了一个关于新UIAppearanceprotocol的演讲.那里还没有很多文档。我将简短地总结一下我记得的内容,以解释我的问题来自哪里:关于UIAppearance:到目前为止,您必须在所有应用ViewController中自定义每个导航栏(工具栏等)属性。使用新的外观属性,您可以只在一个地方为应用程序中的所有导航栏执行此操作。例如:如果您想自定义导航栏背景图像,您可以这样做:[[UINavigationBarappearance]setBackgroundImage:[UIImageimageNamed:@"MyImageName"]forBarMetr

iphone - iOS 5 : Curious about UIAppearance

在2011年技术演讲中,我看到了一个关于新UIAppearanceprotocol的演讲.那里还没有很多文档。我将简短地总结一下我记得的内容,以解释我的问题来自哪里:关于UIAppearance:到目前为止,您必须在所有应用ViewController中自定义每个导航栏(工具栏等)属性。使用新的外观属性,您可以只在一个地方为应用程序中的所有导航栏执行此操作。例如:如果您想自定义导航栏背景图像,您可以这样做:[[UINavigationBarappearance]setBackgroundImage:[UIImageimageNamed:@"MyImageName"]forBarMetr