注意 方法的执行 顺序,并且 如果 为 nil的话,bool类型的数据 也默认是有值的,

                 TNotificationView *notificationView = [[[UINibnibWithNibName:@"TNotificationView"bundle:nil]instantiateWithOwner:selfoptions:nil]objectAtIndex:0];

                notificationView.commmonArray = commonArray;

                [notificationView selectedItem];

-(void)awakeFromNib

{

 

    [self initData];

    //self.medicineField.inputView = self.commonPickerView;

    self.medicineField.inputAccessoryView = self.toolBar;

    self.periodPicker = [[CustomizePickerViewalloc] initWithFrame:CGRectZero];

    self.periodPicker.showsSelectionIndicator = NO;

self.periodPicker.delegate = self;

self.periodPicker.dataSource = self;

    self.medicineField.inputView = self.periodPicker;

   }

原文地址:https://www.cnblogs.com/guligei/p/3169636.html