UIWebView CGRectMake的YouTube自定义设置参数未填充

时间:2013-11-27 14:11:29

标签: iphone objective-c ios7

我遇到了UIWebView的自定义设置参数的问题我已经尝试了一百种差异方式..但是它一直在我的导航栏顶部,它也在滚动的底部一英寸左右。我正在尝试使用CGRectMake,但它没有填充任何内容。

 @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];


}

0 个答案:

没有答案