Skip to main content

All Questions

Filter by
Sorted by
Tagged with
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 ...
xmetal's user avatar
  • 791
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 ...
Gereon's user avatar
  • 17.8k
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 ...
Hamed's user avatar
  • 1,838
1 vote
2 answers
869 views

Setting UITableViewCell selected background color with UIAppearence not working

I want to change the selected color of all my UITableViewCells. I am already using UIAppearence to define basic properties for some other UI elements and it works. However, setting let bgColorView = ...
Igor Kulman's user avatar
  • 16.4k
0 votes
1 answer
268 views

iOS: wrong UITextField color of selected UITableViewCell

I have an issue with UITextField color which belongs to UITableViewCell when it's selected. I have changed default UITableViewCell selection color using the following code that is being called from ...
DJ-Glock's user avatar
  • 1,401
1 vote
0 answers
345 views

Swift theme change not working on UILabel within UITableViewCell

I am working on providing a light/dark theme option to the users in an iOS app. When I put the theme in app delegate, the app loads fine with the proper theme but when I toggle a switch in settings to ...
Rijaz Ali's user avatar
  • 265
8 votes
1 answer
588 views

Assertion failure in -[UITableView _addScrollViewScrollObserver:] while using large title navigation ios 11

I have tab bar controller with view controller that has only a table view in it. I am setting navigation bar large title using code: if (@available(iOS 11.0, *)) { [[UINavigationBar ...
Umair Suraj's user avatar
2 votes
2 answers
1k views

iOS: Override UIAppearance appearanceWhenContainedInInstancesOfClasses

I have a global theme applied that changes the background color of a UITableViewHeaderFooterView. Below is the code: [[UIView appearanceWhenContainedInInstancesOfClasses:@[[...
user1107173's user avatar
  • 10.7k
3 votes
0 answers
145 views

UIAppearance with UITableViewCell selectedBackgroundView

In the header for UITableViewCell, selectedBackgroundView and backgroundColor are not labelled as UI_APPEARANCE_SELECTOR, however the following code works: UITableViewCell *cellAppearance = [...
Raesu's user avatar
  • 310
3 votes
4 answers
943 views

UIAppearance has no effect on Label text color

I am setting the text color of all the labels in my app using UIAppearance. Yet the text color does not change. Here is a sample of how i create the label //show the loading message MessageLabel *...
s.d.'s user avatar
  • 363
7 votes
2 answers
2k views

Change the text colors of all UITableViewCells using UIAppearance

I am not able to change the text colors of a UITableViewCell using UIAppearance mechanism. Here is my code with comments showing what is working for me and what is not: UITableViewCell *cell = [...
frangulyan's user avatar
  • 3,817
0 votes
0 answers
44 views

TableViewCell height incorrect in iOS 8 with appearance proxies

In iOS 8 our table view cells are first displaying with the height from the xib file rather than with the height resulting after the appearance proxies are applied. For example, the fonts from the ...
Peter Alfvin's user avatar
  • 29.3k
2 votes
1 answer
502 views

UIAppearance instances in hierarchy

From Apple's document about UIAppearance: To customize the appearances for instances of a class contained within an instance of a container class, or instances in a hierarchy, use +...
p0lAris's user avatar
  • 4,820
3 votes
1 answer
2k views

UITableView.appearance().separatorStyle not working

In my AppDelegate, I've set the appearance of UITableView like the background and rowHeight etc. But somehow it doesn't work for separatorStyle. Is there any reason why it's not working or is this a ...
Henny Lee's user avatar
  • 3,042
0 votes
1 answer
240 views

Return custom UILabel from a subclass of UITableViewCell (programatically)

I'm new on iOS and so sorry for my bad english. I want to change the appearance theme to my application through the UIAppearance proxy. Then I have some different cells that are a subclass of ...
fras's user avatar
  • 1
0 votes
1 answer
222 views

UIAppearance changing UITableView backgroundView crashes main thread

I have created a tiny little project to show what is happening. You can get it from my GitHub repo. As a brief explanation. I have an app that I want to use an image as the background view of ...
Fogmeister's user avatar
  • 77.5k
1 vote
3 answers
2k views

Change the selected cell background colour using UIAppearance

I need to change the selected cell background colour for all the cells in my app. As I know there is a way to use UIAppearance protocol for this purposes. Is it possible to realize this by the ...
ShurupuS's user avatar
  • 2,923
4 votes
1 answer
1k views

Style UITableViewCell text using UIAppearance

I've got a tableView of type Plain containing one PrototypeCell of Type Custom. The prototype cells class is the default UITableViewCell class, as I'm NOT using any specialized subclass.The problem is,...
Bouncing Bit's user avatar
0 votes
2 answers
587 views

Custom UITableViewCell label text doesn't change back on deselect

I have a custom subclass of UITableViewCell. I am customizing the labels contained within the cell by setting some attributes of UILabel's appearance proxy, as follows: [UILabel ...
Jamie Forrest's user avatar
0 votes
2 answers
615 views

Custom UITableViewCell using UIAppearance proxy

I would like to set a custom image for all the UITableViewCell accessory view in my app. I've tried using this code: [[UITableViewCell appearance] setAccessoryView:[[UIImageView alloc] initWithImage:[...
Claus's user avatar
  • 5,722
8 votes
3 answers
13k views

Create custom UITableView separator line

I would like to create a separator line like this one: Any idea about how to implement it? I tried getting an image of the line and using UIAppearance proxy objects: [[UITableView ...
Claus's user avatar
  • 5,722
0 votes
2 answers
1k views

setBackgroundView appearance for UITableView causes endless loop

I faced strange endless loop in some cases using setBackgroundView for UITableView appearance. Here is appearance initialization: UIImageView *iv = [[UIImageView alloc] initWithImage:[UIImage ...
Oleksandr's user avatar
  • 449
2 votes
3 answers
4k views

Set UITableView BackgroundColor Universally with UIAppearance

I'm trying to universally change the background color for my table views. It is a combination UINavigationController and TabBarController app. I've tried putting the following in AppDelegate ...
DenVog's user avatar
  • 4,286
0 votes
1 answer
5k views

Changing background color of selected UITableViewCells in iOS5

My app displays grouped static UITableViews in different screens. Is there anyway of using the appearance proxies [UITableView appearance] or [UITableViewCell appearance] to customise the ...
Claus's user avatar
  • 5,722
5 votes
1 answer
2k views

UITableView appearance with ios5 UIAppearance not working correctly?

I'm trying to set the background for a number of UITableViews that are loaded inside a UINavigationController. I'm using the appearance proxy added in iOS 5 but it's not working how I'm expecting it ...
PaReeOhNos's user avatar
  • 4,400