我已經爲目標設備iPad Air購買了現有的iOS應用程序,我希望它可以在iPad PRO上運行。這一切工作正常,但我需要一個圖像在兩個設備上保持相同的尺寸(真實尺寸在毫米)。IPad Air App在IPad Pro上擴大規模
這兩款設備的分辨率相同,所以我不明白爲什麼圖像在iPad Pro上更大。這是我繪製圖像的方式。
- (void) drawNewNumberImage {
int index = arc4random()%_allNumbers.count;
while([_currentNumber isEqualToString:[_allNumbers objectAtIndex:index]]) {
index = arc4random()%_allNumbers.count;
}
_currentNumber = [_allNumbers objectAtIndex:index];
int s = _size;
//_imgView.image = [UIImage imageNamed:[_allNumbers objectAtIndex:index]];
_imgView.image = [ImageProvider getPDFVectorImage:[_allNumbers objectAtIndex:index] AndFontSize:s];
CGRect frame = _imgView.frame;
frame.size = CGSizeMake(s, s);
_imgView.frame = frame;
_imgView.center = CGPointMake(CGRectGetWidth(self.view.frame)/2 , CGRectGetHeight(self.contentView.frame)/2);
}
iPad Pro似乎只是擴大了所有的應用程序。有沒有辦法來禁用這種行爲。
確實是這樣的情況。我在AppDelagate方法中創建了一個斷點,self.window的大小爲1024 x 768.爲iPad Air和iPad Pro設置特定啓動圖像的最佳方法是什麼? – feldeOne
解決了這個問題http://stackoverflow.com/questions/25926661/how-do-i-create-launch-images-for-iphone-6-6-plus-landscape-only-apps – feldeOne