449 questions
0
votes
1
answer
32
views
Is it possible to use UINavigationBar appearance to config differenct bar backgroundColor for differenct controller?
I have a navigation stack like this : TabBarController -> NavigationController->ControllerA-> ControllerB.
The ControllerA and ControllerB are pushed into the NavigationController.
And I want ...
1
vote
3
answers
329
views
Changing appearance right after changing app language on fly causing problem in iOS using swift
I have both options Appearance and change Language (to Arabic) in my iOS app. When you change language and try to change appearance, some UI elements restores their direction i.e RTL to LTR
I'm doing ...
-1
votes
1
answer
58
views
How to Change Keyboard Return key type in UISearchBar
I would like to change the string title of the return key of a keyboard invoked by a searchBar in my iOS App. I want to change the title from "Search" to "Done".
My searchBar is ...
-1
votes
1
answer
24
views
How to limit .appearance to NOT effect system ViewControllers like UIActivityViewController?
I use appearance in an existing app for styling and to apply different themes. For example I used UIBarButtonItem.appearance().setTitleTextAttributes(...) to apply a custom font and white color to all ...
0
votes
1
answer
234
views
Is it to automatically apply themes to SwiftUI controls as with Subclasses+Protocols+Appearance in UIKit?
After working with UIKit for quite a while I am now making my first steps in SwiftUI. In UIKit it is quite easy apply different themes to an app (e.g. as described here):
Create different subclasses ...
0
votes
2
answers
828
views
how to remove shawdow of navigation bar in ios?
I want to remove that line and shadow type bar in navigation bar
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: ...
0
votes
2
answers
478
views
UITabBarController Appearance Only Allows Me to Set It Once
Here's the issue:
I have an extension that I've written to allow simple customization of the Tab Bar in a standard UIKit app.
The issue is that it works fine -once.
Subsequent attempts to change the ...
-1
votes
1
answer
205
views
How to add gradient color to UIView using Custom Class and UIAppearnace() in swift
Hello Everyone I want to add Gradient Background Color to UIView using UIAppearnce() with CustomView Class.I am facing an error -
Thread 1: " Illegal axis type, @, for appearance setter, ...
5
votes
1
answer
2k
views
Setting a UITabBarAppearance breaks UITabBarItem appearance proxy font size when selecting tabs
The following, which sets the title text appearance proxy to use a big font, works as expected, and the UITabBarItems retain their big font when you select them:
func application(_ application: ...
2
votes
1
answer
969
views
Widget.Material3 TextAppearance attribute Error
While using this style from material styles, It doesn't matter where I provide the TextAppearance in my AppTheme or extend that style itself and provide TextAppearance
The app crashes with the ...
1
vote
0
answers
247
views
How to change UIBarButtonItem tint color based on whether UINavigationBar is showing large or normal (collapesed)?
Setting the appearance of a UINavigationBar title, background, etc. based on whether it is showing large or normal is no problem. But how to update the appearance / tint color of the bar button items ...
0
votes
2
answers
61
views
Why does UIButton Label ingnores appearance setting when contained in UITableView tableHeaderView?
I have created a simple UIViewController which contains a UITableView. When adding a tableHeaderView which includes a UIButton it seems not to be possible to change the button label using appearance ...
1
vote
0
answers
439
views
UITabBar items title issue, when the title is long and using UITabBarAppearance
Because of iOS 15’s scrollEdgeAppearance transparent problem, I have to use UITabBarAppearance to set my UITabBar. But when using UITabBarAppearance, if the title is long, it will overflow the item ...
2
votes
0
answers
81
views
Detecting when UINavgiationBar appearance changes from standardAppearance to scrollEdgeAppearance
How to determine if the Navigation Controllers UINavigationBar changes the appearance between
standardAppearance <-> scrollEdgeAppearance
as the underlaying UISCrollView changes it's scroll
...
0
votes
0
answers
687
views
SwiftUI: Start/stop timer when View appears/disappears
I've got a view where I show a document (basically a background image with some emojis on it). There are multiple documents in my NavigationView and whenever I load a a document (DocumentView gets ...
1
vote
1
answer
449
views
Is it possible to use different colors for focused and selected state on uitabbaritems at tvOS?
In our tvOS app we have a customised tabbar. now additionally we want to change the background color of the focused/selected item. When I do by tabBarAppearance.selectionIndicatorTintColor = .purple, ...
0
votes
1
answer
390
views
UIView: how does the appearance() proxy work?
I have created a simple custom UIView:
final class TestView: UIView {
var testColor: UIColor = .white {
didSet {
backgroundColor = testColor
}
}
}
Then I wrote ...
3
votes
1
answer
3k
views
iOS 15 UITabBarItem customization
I have UITabBarConroller subclass and custom items. Customization looks like this:
private func updateTabBar() {
guard let items = tabBar.items,
tabViewControllers.count == items.count ...
-2
votes
2
answers
1k
views
UINavigationBar.appearance().isTranslucent not working
When I use this:
UINavigationBar.appearance().backgroundColor = UIColor(named: "brown")
I get a nav bar that has the correct brown and it is translucent.
But I don't want it to be ...
0
votes
1
answer
133
views
Remove/handle UINavigationBar UIAppearence to fix issue in UIActivityViewController share screen title transparent after tapping more in Swift iOS
I've applied UINavigationBar.appearence() with use of class UIAppearence() throught out the app. Due to this facing issue while showing UIActivityViewController() share doc, I want to remove ...
0
votes
0
answers
86
views
swift 5 UIswitch value change was not working when using loadview method
I am following this example.
@IBAction Func DarkButton(_sender:UISwitch) {
if (sender.isOn) {
Theme.darkTheme() self.loadView()
} else {
Theme.lightTheme() self.loadView()
...
1
vote
0
answers
34
views
UIAppearance Protocol for MessagesExtension App
I'm working on an iOS Messages Extension app. In this app, I use google autocomplete. To style an autocomplete table, Google recommends using the UIAppearance protocol in the AppDelegate.m file for ...
2
votes
1
answer
280
views
Custom UIBarButtonItem not working with appearance
i have subClass from UIBarButtonItem, when set setBackgroundImage with appearance not working, but create subClass from UIButton set image worked!.
my code:
MyCustomBarButtonItem.appearance()....
0
votes
1
answer
338
views
Setting UIBarButtonItem appearance resulted in weird behaviour with back button
let attributes = [
NSAttributedString.Key.foregroundColor: UIColor.orange,
NSAttributedString.Key.font: UIFont.systemFont(ofSize: 22)
]
// set nav bar button ...
-1
votes
1
answer
808
views
UNITY Appear text next to mouse click
I want to make a text that appears next to the mouse button, where i click on a button. So i have a huge button, and i want that text to appear next to the mouse/touch screen where i clicked. How can ...
1
vote
0
answers
357
views
Factual UIAppearance limitations for VC and swiftUI?
I was trying to go for a Theme object allowing me to well, manage the appearance of all my UI component toolbox.
Even though I understand that UIAppearance is what Apple wants you to use, I am ...
1
vote
0
answers
1k
views
Disable ScrollView bounces of a single view - SwiftUI
How can I disable ScrollView bounces of a single view without affecting the others?
UITableView.appearance().bounces = false
If I initialize this code it disable bounces of all ScrollView istance. Is ...
0
votes
1
answer
2k
views
Use UINavigationBar appearance "back" icon for custom button?
I need to achieve a custom navigation bar's "< back" button as seen in the push segue, but on a modal.
I want to avoid too much hard-coding and found out about the property ...
0
votes
1
answer
1k
views
iOS - Customize Navigation Bar for only some UIViewController
I have to add new screens to an existing app, that will use a different navigation bar style than the one that already exists and will be accessed from different screens. The idea would be to show the ...
1
vote
1
answer
210
views
How to control UITableViewCell's label appearance via UIAppearance?
I'm using a UITableView from an external library. This table view creates UITableViewCells using style: .default. I want to change the appearance of the cell, most importantly the cell's label text ...
0
votes
1
answer
2k
views
Detect UITableViewCells that appear on the screen
I need to make a request when the user saw the UITableViewCell, I used func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) but this method call ...
0
votes
2
answers
121
views
Is there a way to change UILabel line spacing throughout the whole app like using UIAppearance or something like that
I am trying to set the line spacing of all used UILabel in my app. I have found a solution to set line spacing using NSMutableParagraphStyle and attributedText but I am trying to find another solution ...
3
votes
2
answers
2k
views
rstudio color appearance, specific color for package names, front ::
I'm working with R, in RStudio, and I use to specify the package of each function in my scripts, even if the package is already loaded in the environment. I want to be sure that the code will use the ...
0
votes
0
answers
127
views
Reusing Navigation Bar font in Xamarin Forms
We need to add specific buttons to the left hand side of the NavigationBar in a Xamarin Forms View.
That is currently only supported via a TitleView because ContentPage.ContextItems all appear on ...
3
votes
3
answers
1k
views
UIBarButtonItem setBackButtonTitlePositionAdjustment doesn't work
Updated
I want to change offset between Arrow and Text in Back Button in Navigation Bar. It works just fine until I set
UINavigationBar.appearance().standardAppearance = newAppearance
Here is the ...
1
vote
3
answers
551
views
UIAppearance tintColor takes priority over Storyboard tintColor
I created a simple view controller using Interface Builder that contains an UIImageView and UIButton. On both of them, I set tintColor to be Magenta.
On the AppDelegate, I set UIView.appearance....
10
votes
2
answers
2k
views
iOS 13 UIBarButtonItem .close ( X ) tintColor
This might have been answered already but I can't seem to find the answer.
iOS 13 introduces the new UIBarButton.SystemItem value of .close.
I have played with the new proxy appearance APIs but no ...
5
votes
0
answers
331
views
Customize MFMailComposeViewController
I have an issue with customizing the appearance of the MFMailComposeViewController on iOS 13.
My application uses a dark navigation bar and white tint on items in the bar.
UINavigationBar....
2
votes
0
answers
107
views
UIAppearance modifier is ignored on iOS 13 when pushed to a new UIViewController
We set the UIAppearance of our UIBarButtonItems for the whole app like this:
[[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UINavigationBar class]]] setTitleTextAttributes:...
1
vote
1
answer
283
views
iOS 13 navigation bar styling: huge differences between device and simulator
I am styling my iOS app with this bit of code:
window.tintColor = .black
// Completely white navbar
UINavigationBar.appearance().barStyle = .default
UINavigationBar.appearance().isTranslucent = ...
0
votes
2
answers
241
views
How do I use the "new" Common Item Dialog with wxwidgets?
I want to create a file open dialog with wxwidgets that uses the "new" style of the Common Item Dialog under Win-Vista and newer. Is there any way to achive this? With the wxFileDlg() I get a dialog ...
1
vote
0
answers
186
views
In Swift how to have a global tint color except in one place?
In my app I have a global tint color that I set in the app delegate like this and it works fine. I get that tint color everywhere.
UIView.appearance().tintColor = globalTintColor
I have a table ...
0
votes
1
answer
345
views
How to remove title from UIBarButtonItem.appearance() on iOS 10.3
I want to personalize the Back Button of my app to have a consistent looking. So I'm setting a image as the Back Button of a Navigation Bar.
The code bellow works fine on any iOS above iOS 10. So, I'...
1
vote
1
answer
118
views
UILabel appearance doesn't seem to do anything
It seems that [UILabel appearance] doesn't work anymore with latest iOS SDK.
Let's take this as an example:
- (void)viewDidLoad {
[super viewDidLoad];
[[UILabel appearance] ...
1
vote
3
answers
741
views
How to change UIButton titlelabel fonts style and size in appearance()?
I am using the code below but it's not working. Can anyone help me to resolve this problem?
UIButton.appearance().titleLabel?.font = UIFont(name: "Roboto-Regular", size: 20.0)
0
votes
1
answer
710
views
Swift.- UIAppereance of UISwitch does not take layer.cornerRadius into account
I am trying to use appearance to set general default layouts/designs across the app. For UISwitch, to set the off color not only at the border, one has to do a tweak (see Change color of UISwitch in &...
0
votes
1
answer
219
views
UIAppearance of UILabel whithin UICollectionViewCell - selected/unselected
I am currently working with UIAppearance for the colors of all my outlets on my project, which allowed me to create my own "DIY" version of a nightmode on my iOS app.
sample :
UILabel.appearance()....
2
votes
0
answers
527
views
In iOS 13 - How can we implement more than two color modes / themes?
Looking at the brand new WWDC video Implementing Dark Mode on iOS we see that it can be handled quite easily. We can use the new dynamic system colors and they will have specific values depending on ...
1
vote
1
answer
61
views
UIAppearance edge insets
I have a UIView subclass which I use in my app (And is in a 3rd party library) for displaying toast notifications. I want to modify this slightly for another app I'm working on and so I'm adding ...
0
votes
0
answers
38
views
Is there a list of all the UIApperance traits for each control/view? [duplicate]
So if we want to make all UIButtons have a red background, we can use UIButton.appearance().backgroundColor = UIColor.red.
This is great and really convenient, but I'm wondering if there's a list of ...