Created
August 7, 2008 04:21
-
-
Save kastner/4334 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { | |
return 1; | |
} | |
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | |
return 1; | |
} | |
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { | |
return @"Type your Question:"; | |
} | |
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { | |
return 180.0f; | |
} | |
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |
static NSString *MyIdentifier = @"MyIdentifier"; | |
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier]; | |
if (cell == nil) { | |
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:MyIdentifier] autorelease]; | |
} | |
// Configure the cell | |
CGRect rect; | |
rect.origin.x = 10; | |
rect.origin.y = 10; | |
rect.size.width = 295; | |
rect.size.height = 160; | |
UITextView *textView; | |
textView = [[UITextView alloc] initWithFrame:rect]; | |
//[textView setBackgroundColor:[UIColor cyanColor]]; | |
[textView becomeFirstResponder]; | |
[textView setScrollEnabled:NO]; | |
[cell addSubview:textView]; | |
[textView release]; | |
[cell setNeedsLayout]; | |
return cell; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment