This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes iOS and the fly likes How to create a grey (or any color) UILabel? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » iOS
Bookmark "How to create a grey (or any color) UILabel?" Watch "How to create a grey (or any color) UILabel?" New topic
Author

How to create a grey (or any color) UILabel?

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

Hi,
I want to create a UILabel with grey background:

But no grey area is shown around the priority.
If I add a new one, a grey area appears for less than a second around the priority but it disappears immediately. Not to mention that the priority value isn't located at the center for the grey area.

Any idea what I'm doing wrong?
Pratik Goswami
Ranch Hand

Joined: Mar 02, 2009
Posts: 136

Hi John,

You should set background color of UILabel rather than layer's background color of UILabel
Change this line

with this


Thanks
Pratik Goswami


iOS * Android Developer
 
Consider Paul's rocket mass heater.
 
subject: How to create a grey (or any color) UILabel?
 
Similar Threads
JCheckbox DefaultCellEditor funny in JTable
To show an UITableView on an UIView
Inserting web content in your native iPhone application
Modifying the ImagePicker Controller
JTable JCheckBox Cell Editor works on strings -- badly