Iphone 未填充UIWebView CGRectMake的YouTube自定义设置参数
我在UIWebView的自定义设置参数方面遇到问题,我尝试了100种不同的方法。。但它一直在顶部我的导航栏下,它也在滚动条的底部移动了一英寸左右。我试图使用CGRectMake,但它没有填充任何内容Iphone 未填充UIWebView CGRectMake的YouTube自定义设置参数,iphone,objective-c,ios7,Iphone,Objective C,Ios7,我在UIWebView的自定义设置参数方面遇到问题,我尝试了100种不同的方法。。但它一直在顶部我的导航栏下,它也在滚动条的底部移动了一英寸左右。我试图使用CGRectMake,但它没有填充任何内容 @interface songVideoViewController () @end @implementation songVideoViewController @synthesize tubeName; @synthesize webVPrg; - (id)initWith
@interface songVideoViewController ()
@end
@implementation songVideoViewController
@synthesize tubeName;
@synthesize webVPrg;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
//webVPrg = [[UIWebView alloc]init];
[super viewDidLoad];
_sidebarButton.target = self.revealViewController;
_sidebarButton.action = @selector(revealToggle:);
_sidebarButton.tintColor = [UIColor colorWithWhite:0.96f alpha:0.2f];
// Set the Label text with the selected recipe
NSArray *bossConverter = [tubeName componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
NSString *bossInput = [bossConverter componentsJoinedByString:@"+"];
webVPrg = [[UIWebView alloc] initWithFrame:self.view.frame];
NSURL *url = [NSURL URLWithString:([NSString stringWithFormat:@"http://www.youtube.com/results?search_query=%@&oq=%@&v2", bossInput, bossInput])];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
//webVPrg.frame = CGRectMake(0, 0, 100, 50);
webVPrg.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.view addSubview:webVPrg];
[webVPrg loadRequest:request];
}