CGFloat enterw = self.view.frame.size.width-80;//245;
CGFloat y = 0;
Containerview = [[UIView alloc] Initwithframe:cgrectmake (0, Y, Self.view.frame.size.width, 40)];
[Self.view Addsubview:containerview];
TextField = [[Uitextfield alloc] Initwithframe:cgrectmake (5, ENTERW-10, 30)];
Textfield.font = [Uifont systemfontofsize:18.0f];
Textfield.returnkeytype = Uireturnkeydone;
Textfield.clearbuttonmode = uitextfieldviewmodewhileediting; Show Disposable Delete button
Textfield.backgroundcolor = [Uicolor Whitecolor];
TextField.layer.borderWidth = 1.0;
TextField.layer.cornerRadius = 5.0;
TextField.layer.borderColor = [Uicolor Lightgraycolor]. Cgcolor; Show Border color
Textfield.leftviewmode = Uitextfieldviewmodealways;
Textfield.contentverticalalignment = Uicontrolcontentverticalalignmentcenter; Control Center
Textfield.leftview = [[Uiimageview alloc] initwithimage:[uiimage imagenamed:@ "Searchicon"];
Textfield.leftview.contentmode=uiviewcontentmodecenter; Show left Magnifier
Textfield.autoresizingmask = Uiviewautoresizingflexiblewidth;
[Containerview Addsubview:textfield];
UIButton *uploadbtn = [[UIButton alloc] init];
Uploadbtn.frame = CGRectMake (self.view.frame.size.width-70-5, 5, 70, 30);
[Uploadbtn settitle:@ "search" forstate:uicontrolstatenormal];
[Uploadbtn Successstyle];
[Uploadbtn addtarget:self Action: @selector (uploadbtnpressed) forcontrolevents:uicontroleventtouchupinside];
[Containerview ADDSUBVIEW:UPLOADBTN];
[Containerview addobserver:self forkeypath:@ "frame" options:nskeyvalueobservingoptionnew Context:nil];
NSLog (@ "Containerview y%f", containerview.frame.origin.y);
New Search Bar