2014-02-08 35 views
1

通過AppleTV和Airplay鏡像連接的電視的UIScreen是否有設置(點)尺寸?AppleTv的UIScreen的尺寸

或者appletv的屏幕會根據實際的電視設備而有不同的大小?

回答

1

,appletv的屏幕根據實際的電視設備是不同的大小。

如果你想從設備得到連接電視的尺寸, 按照這些:

通知中心

NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; 
     [center addObserver:self selector:@selector(handleScreenDidConnectNotification:) name:UIScreenDidConnectNotification object:nil]; 

連通知

-(void)handleScreenDidConnectNotification : (NSNotification *)aNotification{ 
     UIScreen *newScreen = [aNotification object]; 
     CGRect screenBounds = newScreen.bounds; 
     // screenBounds --> Get the size from it 
    } 
+1

好吧我只是意識到d,通常支持1080p的AppleTV3,當從應用程序做AirPlay時只能處理720p ......正如一些人已經在這裏討論的那樣http://stackoverflow.com/q/9952739/129202擁有1080p輸出真的很不錯。 – Jonny

+1

好吧,更正確的答案可能應該是,使用AirPlay的媒體流可能適用於1080p的媒體,如視頻和圖片,而*鏡像*只適用於720p。而且這是「鏡像」,將在製作應用程序時用於任何其他情況。有趣的是,即使它被稱爲鏡像,兩個屏幕的內容也不同,所以鏡像詞根本不適合。讓我們希望Apple有一天會清除它... – Jonny