I am working on an application in which a segment controller is added as a sub view as follows:
{
segment = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObjects:@"a",@"b",nil]];
[segment setFrame:CGRectMake(70, 22, 200, 40)];
[segment setSegmentedControlStyle:UISegmentedControlStylePlain];
[window addSubview:segment];
}
which is in the app delegate. Auto rotation is enabled in my application in other views. But how can I give autorotation to this segment controller which is added in the app delegate. Anyone have the answer? Please.
I think it will be better if you also set your segment controller co ordinate in below method:
in every class.Just try I hope it will be work. let me know if any clarification.