Comments (5)
The best way probably is to subclass UITableViewCell and then set it via your table_data method:
UITableViewCell docs: http://developer.apple.com/library/ios/#documentation/uikit/reference/UITableViewCell_Class/Reference/Reference.html
Setting the custom cell type:
def table_data
[{
title: "My Header",
cells: [
{ title: "Something", cellClass: MyCustomTableViewCell, action: :some_action }
]
}]
end
NOTE: cellClass will become cell_class in ProMotion 0.4, coming out soon, like next week. cellClass will work but will be deprecated.
from promotion.
You can also use Teacup with ProMotion.
https://github.com/rubymotion/teacup
from promotion.
Thanks for the follow-ups! Really enjoying the gem.
from promotion.
No problem -- glad it's useful to you!
from promotion.
FYI, I inelegantly added a workaround for this in my case by adding:
dataCell[:font_resize] ||= false
tableCell.textLabel.adjustsFontSizeToFitWidth = dataCell[:font_resize]
That was all I really needed to accomplish!
from promotion.
Related Issues (20)
- Unable to position a TableView by using frame style HOT 4
- ProMotion lifecycle methods running out of order HOT 1
- Unable to add remote image to nav_bar button HOT 3
- Switching to Screen if already open HOT 2
- How to scroll TableScreen to bottom programatically? HOT 2
- Change tab_bar backgroundcolor HOT 2
- Remote images not showing on first load of Table Screen HOT 3
- use custom class for open_tab_bar HOT 1
- Image picker crashes in iOS10 HOT 1
- 'live' and 'pm_live' don't work anymore with version 4.13 HOT 10
- app delegate methods never called HOT 2
- Error can't convert CommentScreen into String (TypeError) HOT 5
- CollectionScreen crashes after reloading data HOT 1
- Cynical dependencies HOT 3
- Circular dependencies on High Sierra HOT 11
- search_text no longer works
- uninitialized constant ProMotion::UITabBarController (NameError) HOT 6
- Regression: WebScreen synchronous javascript execution
- Regression (or simply failing test): table screen `on_reuse` is not called after scrolling
- Ruby 2.6 deprecations removed in Ruby 2.7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from promotion.