i've created a subclass of an UisegmentControl and added to my project.
#import <UIKit/UIKit.h>
@interface MMcustomsegment : UISegmentedControl
@end
on the storyboard i've chose the right custom class on the identity inspector. But when i run it i've the standard layout of the segmentcontrol...
if i add my custom segment programatically in this way
MMcustomsegment *mySegmentedControl = [[MMcustomsegment alloc]
initWithItems:tipoord];
mySegmentedControl.frame = CGRectMake(20, self.view.frame.size.height - 160, 280, 29);
mySegmentedControl.selectedSegmentIndex = 0;
[mySegmentedControl addTarget:self action:@selector(valueChanged:) forControlEvents: UIControlEventValueChanged];
[self.view addSubview:mySegmentedControl];
it works!!
same staff for my custom uistepper
I really don't know how to solve it. thanks
ps sorry for my bad english