[TIMOB-1135] iOS: Ability to set font properties on a tableViewRow
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-04-30T17:48:41.000+0000 |
Affected Version/s | Release 2.0.1 |
Fix Version/s | Release 2.1.0, Sprint 2012-08 |
Components | iOS |
Labels | api, parity, qe-testadded |
Reporter | ctredway |
Assignee | Neeraj Gupta |
Created | 2011-04-15T02:44:55.000+0000 |
Updated | 2013-12-10T05:51:29.000+0000 |
Description
This was first asked in Q & A and then submitted by a premium customer. Users want to be able to set font properties on a table without needing to use a label.
Q&A question:
http://developer.appcelerator.com/question/33581/bug-table-row-font-doesnt-work-on-iphone#header">
http://developer.appcelerator.com/question/33581/bug-table-row-font...
Things to be able to set are size, font weight, and font.
See current Android behavior in screenshot in linked ticket
Note that the native feature was deprecated in iOS3. See http://developer.apple.com/library/IOs/#documentation/UIKit/Reference/UITableViewCell_Class/Reference/Reference.html
As per discussion with Don in IRC #appcelerator, this will need to be documented as Android-only.
I've checked TiUITableViewRowProxy.m file and found that it uses textLabel for "title" property which is UILabel. So UILabel can have "font" property which is not deprecated. Am I wrong?
There was a pull request for the issue but commit-er does not interested in the project anymore. I've re-organized the code and made a pull request. See: https://github.com/appcelerator/titanium_mobile/pull/1466 Tested with iOS 5 SDK on iPhone Simulator.
Updated pull request with latest master and made changes about rolling back to system default font if it's not given. Tested with: Titanium SDK version: 2.1.0 (04/26/12 12:38 9bd4b97) iPhone SDK version: 5.1 Here is the function test code:
By the way TIMOB-6504 is duplicate of this issue.
Community pull request merged. Credit to https://github.com/hdogan
Tested with 2.1.0.v20120606162652 on iPod 3rd gen 4.0.2 and iPad Sim 5.1
Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4940