objective c - Can someone help me convert this OBJ-C code to Swift? -


im trying add facebook audience network project tutorial in objective c , need in swift. made bridging header, need add code. can convert swift me? thank you! heres link if want take @ it:

https://developers.facebook.com/docs/audience-network/ios/banner

- (void)viewdidload  {      [super viewdidload];       fbadview *adview = [[fbadview alloc] initwithplacementid:placement_id adsize:kfbadsizeheight50banner rootviewcontroller:self];      [adview loadad];      [self.view addsubview:adview];  } 

this should work, let me know if trouble

override func viewdidload() {     super.viewdidload()     let adview: fbadview = fbadview(placementid:placement_id, adsize:kfbadsizeheight50banner, rootviewcontroller:self);     adview.loadad();     self.view.addsubview(adview); } 

Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -