1
我已經創建了一個分段控制器,它有不同大小的段。 當我檢查我看到段控制器具有不同的寬度大小段,但是當我嘗試觸摸最大的段時,它只能在段的左側部分上觸及。 (可能只是第一個50像素的部分,但部分是160像素)。我如何設置細分受衆羣區域?UISegmentedControl段的大小觸摸檢測
//My header file:
#import <UIKit/UIKit.h>
@interface Form1 : UIViewController <UIAlertViewDelegate>{
IBOutlet UISegmentedControl *combobox6001;
}
@property (nonatomic, strong) IBOutlet UISegmentedControl *combobox6001;
@end
#import "Form1.h"
@implementation Form1
@synthesize combobox6001;
- (void) viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[combobox6001 setWidth:50 forSegmentAtIndex:0];
[combobox6001 setWidth:50 forSegmentAtIndex:1];
[combobox6001 setWidth:160 forSegmentAtIndex:2];
}