小编Bri*_*ves的帖子

如何在iOS视网膜和非视网膜的屏幕底部放置admob横幅

我已经构建了一个phonegap应用程序,并希望为其添加Admob横幅.我在iOS6模拟器的屏幕底部有横幅,但是当我在视网膜设备上测试时,横幅将离开底部,就像它仍然试图调整屏幕尺寸以进行非视网膜显示.这是我在viewDidLoad中的当前代码:

// Initialize the banner at the bottom of the screen.
CGPoint origin = CGPointMake(0.0,
                             self.view.frame.size.height -
                             CGSizeFromGADAdSize(kGADAdSizeBanner).height);

// Use predefined GADAdSize constants to define the GADBannerView.
bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner
                                             origin:origin];

// Specify the ad's "unit identifier." This is your AdMob Publisher ID.
bannerView_.adUnitID = @"xxxxxxxxxxxx";

// Let the runtime know which UIViewController to restore after taking
// the user wherever the ad goes and add it to the view hierarchy.
bannerView_.rootViewController = self;
[self.view addSubview:bannerView_];

// Initiate …
Run Code Online (Sandbox Code Playgroud)

iphone objective-c ios cordova

6
推荐指数
2
解决办法
9653
查看次数

Laravel - 如何查询DB中的数组字段是否包含值

我的模型中有一个字段Person叫做jobs我正在铸造成一个数组.jobs是一个与Jobs表相关的id数组.我希望能够查询Person并返回其job数组中具有特定id的所有内容.我看到Laravel有一个whereIn子句检查数据库值是否在数组中,但我需要相反 - 检查数据库数组是否包含值.

我不得不使用where('jobs', 'like', '%"' . $job_id . '"%')

php mysql arrays laravel-5

3
推荐指数
2
解决办法
3935
查看次数

标签 统计

arrays ×1

cordova ×1

ios ×1

iphone ×1

laravel-5 ×1

mysql ×1

objective-c ×1

php ×1