You need to set the frame of the UIRefreshControl
. Use this code
UIRefreshControl *refContr=[[UIRefreshControl alloc] initWithFrame:CGRectMake(0, 0, 20, 20)];
[refContr setTintColor:[UIColor blueColor]];
[refContr setBackgroundColor:[UIColor greenColor]];
[stocktable addSubview:refContr];
[refContr setAutoresizingMask:(UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleLeftMargin)];
[[refContr.subviews objectAtIndex:0] setFrame:CGRectMake(30, 0, 20, 30)];
NSLog(@"subViews %@",refContr.subviews);
Output: