首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >AppleTv的UIScreen尺寸

AppleTv的UIScreen尺寸
EN

Stack Overflow用户
提问于 2014-02-08 08:07:21
回答 1查看 365关注 0票数 1

电视的UIScreen是否有通过AppleTV和Airplay镜像连接的集合(点)大小?

或者根据实际的电视设备,appletv的屏幕是否有不同的尺寸?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-02-08 08:16:10

,根据实际的电视设备,appletv的屏幕大小不同。

如果您想从设备中获取连接电视的大小,请按以下步骤操作:

通知中心

代码语言:javascript
复制
  NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
        [center addObserver:self selector:@selector(handleScreenDidConnectNotification:) name:UIScreenDidConnectNotification object:nil];

连接通知

代码语言:javascript
复制
 -(void)handleScreenDidConnectNotification : (NSNotification *)aNotification{
        UIScreen *newScreen = [aNotification object];
        CGRect screenBounds = newScreen.bounds;
        // screenBounds --> Get the size from it
    } 
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21643614

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档