iphone - is it possible to change the style of uitableview in two different views? -
this question has answer here:
i have table , have declared style grouped table style in view did load have button on click of want change style of same table.
initially setting in view did load method:
tableobj= [[uitableview alloc]initwithframe:cgrectmake(5,50,310,300)style:uitableviewstylegrouped];
but on button click event setting tableview fram , style see below code
tableobj.frame=cgrectmake(5,50,310,300); tableobj style=uitableviewstyleplain;
but gives error.....assignment readonly property ??
according docs, uitableview's style
property declared thus:
@property(nonatomic, readonly) uitableviewstyle style
that readonly
keyword means can value of property, can't set it. can set style when create table using -initwithframe:style:
. agrees error message received:
assignment readonly property
put simply, can't that.
Comments
Post a Comment