Welcome, Guest
Username Password: Remember me

Customizable UITextView cell behavior
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Customizable UITextView cell behavior

Customizable UITextView cell behavior 1 year, 7 months ago #1

Hello again,

I would like an option to have a UITextView type cell open a detail view with one large UITextView. Something like the comment entry screen in the facebook app.

Is this possible to do using the willConfigureCell delegate method?

Thanks!
  • kamanova
  • OFFLINE
  • Junior Boarder
  • Posts: 20
  • Karma: 3

Re: Customizable UITextView cell behavior 1 year, 7 months ago #2

Actually I think it is better to put the textview cell in its own section, so you can disregard my previous post.

One problem with this, the top and bottom left corners of the text view overlap the cell border when the table has a grouped style.

Thanks again!
  • kamanova
  • OFFLINE
  • Junior Boarder
  • Posts: 20
  • Karma: 3

Re: Customizable UITextView cell behavior 1 year, 7 months ago #3

Would you please post the code you used to create this? Thanks!
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: Customizable UITextView cell behavior 1 year, 7 months ago #4

I am using iOS 4.1.

The root view controller is a UITableView with style set to Grouped in IB.


- (void)viewDidLoad {
[super viewDidLoad];
 
self.title = @"testing";
 
model = [[SCTableViewModel alloc] initWithTableView:self.tableView withViewController:self];
object = [[testobject alloc] init];
 
SCClassDefinition *def = [SCClassDefinition definitionWithClass:[testobject class]
withPropertyNames:[NSArray arrayWithObject:@"longField"]
withPropertyTitles:[NSArray arrayWithObject:@""]];
 
[def propertyDefinitionWithName:@"longField"].type = SCPropertyTypeTextView;
 
SCObjectSection *section = [SCObjectSection sectionWithHeaderTitle:@"Enter some long text in this field:" withBoundObject:object withClassDefinition:def];
[model addSection:section];
}
 
  • kamanova
  • OFFLINE
  • Junior Boarder
  • Posts: 20
  • Karma: 3

Re: Customizable UITextView cell behavior 1 year, 7 months ago #5

kamanova wrote:
One problem with this, the top and bottom left corners of the text view overlap the cell border when the table has a grouped style.


To (temporary) fix this, I'v done a little hack.
I put this into -(void)layoutTextView in SCTableViewCell.m:

self.textView.backgroundColor = [UIColor clearColor];


This removes the (white) background color of the text view so that the cell borders shine through.
But note that I don't how this affects plain style table views.
  • Patrick
  • OFFLINE
  • Senior Boarder
  • Posts: 49
  • Karma: 3
Last Edit: 1 year, 7 months ago by Patrick.

Re: Customizable UITextView cell behavior 1 year, 7 months ago #6

Thanks Patrick. We're still working on solving this and we'll update you guys ASAP.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72
  • Page:
  • 1
Time to create page: 1.73 seconds