How to set label and its dynamic text to center of uiview.
myView = [[UIView alloc] initWithFrame:CGRectMake(0,20,self.view.frame.size.width,32)];
[myView setBackgroundColor:[UIColor lightGrayColor]];
[self.view addSubView:myView];
UILabel *myLabel = [[UILabel alloc]initWithFrame:CGRectMake(myView.frame.size.width/2,10,0, 12)];
[myLabel setFont:[UIFont Helvetica12]];
[myLabel setText:[listDiction objectForKey @"dynaimicText"];
[myLabel sizeToFit];
myLabel.center = myView.center;
[myView addSubview:myLabel];
Need your advice on this.