Questions tagged [initwithstyle]
12 questions
7
votes
6 answers
Rotate a custom UITableViewCell
I have a custom UITableViewCell which contains several UIButtons. Each button's frame position is relative to the cell width. I set autoresizingMask=UIViewAutoresizingFlexibleWidth so it will adjust the cell width and the button positions properly…

Wayne Lo
- 3,689
- 2
- 28
- 28
4
votes
1 answer
How to make custom TableViewCell with initWithStyle after 3.0
I am trying to have custom TableViewCell with initWithStyle, since it says initWithFrame is deprecated after 3.0. Everything worked fine with initWithFrame before.
Is there any tutorials or sample code available for this? Thanks.

0pcl
- 1,154
- 4
- 17
- 22
2
votes
1 answer
iOS custom UIView design: init vs layoutSubviews
I have a number of custom UIViews.
I constantly find myself initializing properties in the init of my custom view, but I also set the frame there too.
I usually leave my layoutSubviews empty. If I don't expect my view bounds to change, is it ok to…

samonderous
- 649
- 1
- 10
- 22
1
vote
2 answers
How to prevent usage of other init methods other than my custom method in Objective-C
Background - in my iPhone app I have a custom UITableViewController - I was going to pass some required config to it by extending the existing "(id)initWithStyle:(UITableViewStyle)style" method to an extended custom one.
Question - what's the best…

Greg
- 34,042
- 79
- 253
- 454
0
votes
2 answers
Why am I getting an error for this?
Why am I getting these errors?
alt text http://img39.imageshack.us/img39/2203/help.tif
It says:
Error: Request for member "jokeTableView" in something not a struction or union
What does that mean? And why is it breaking. I tried reading about…
user100051
0
votes
4 answers
How to fix: initWithFrame:CellFrame reuseIdentifier:cellIdentifier deprecated
I upgraded to XCODE 4.2 and suddenly i got all these warning signals. Most of the i am able to fix but the following I do not know how to. I have tried to read-up on it but still have problem.
The code that is deprecated is:
UITableViewCell *cell =…

PeterK
- 4,243
- 4
- 44
- 74
0
votes
1 answer
initialize TableViewController with initWithStyle from TabBarController in Interface Builder?
I have a TabBarController in Interface Builder.
I assigned a subclassed UITableViewController as ViewController of Tab 2, works fine.
But I would like to set the style of the UITableViewController's TableView to UITableViewStyleGrouped.
The only way…

marimba
- 3,116
- 5
- 26
- 29
0
votes
2 answers
UITableView from storyboard - init with UITableViewStyleGrouped
How do you initialize a UITableViewController to have UITableViewStyleGrouped when it is created in a storyboard? Normally I would create a grouped table view like this:
- (id)initWithStyle:(UITableViewStyle)style
{
self = [super initWithStyle:…

user3925803
- 3,115
- 2
- 16
- 25
0
votes
1 answer
loadNibNamed at Base Class override the instance of Child Class
I have class hierachy with
ParentCell extends UITableViewCell
ChildCell extends ParentCell
ParentCell have separate XIB, In child cell i was creating and adding only one button to one view at ParentCell XIB. but i cant add action for this button.…

Rooban Ponraj A
- 281
- 4
- 20
0
votes
1 answer
No visible @interface for 'UIViewController' declares the selector initWithStyle:reuseIdentifier:
I instantiate a UITableView in a UIViewController when the view is loaded as :
table = [[UITableView alloc]initWithFrame:CGRectMake(self.view.frame.origin.x,self.view.frame.origin.y + hauteurFavorisCell, self.view.frame.size.width,…

yaniki
- 1
- 2
0
votes
1 answer
initWithStyle:(UITableViewStyle)style looks not called
create a default view controller of UITableViewController, in its .m, default init method as below
- (id)initWithStyle:(UITableViewStyle)style
{
self = [super initWithStyle:UITableViewStyleGrouped];
if (self) {
// Custom initialization
…

S1U
- 825
- 2
- 14
- 26
0
votes
1 answer
UITableView forced to be UITableViewStyleGrouped but still UITableViewStylePlain sometimes
I have a UITableViewController and i use custom init methods like
-(id)initWithCustomStuff{
self = [super initWithStyle:UITableViewStyleGrouped];
if (self) {
// Custom stuff happening
}
return self;
}
And as you see, I forced the…

Laszlo
- 2,803
- 2
- 28
- 33