惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Vulnerabilities – Threatpost
aimingoo的专栏
aimingoo的专栏
B
Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
GbyAI
GbyAI
阮一峰的网络日志
阮一峰的网络日志
Engineering at Meta
Engineering at Meta
IT之家
IT之家
V
Visual Studio Blog
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
A
About on SuperTechFans
博客园 - 聂微东
Blog — PlanetScale
Blog — PlanetScale
N
News and Events Feed by Topic
A
Arctic Wolf
WordPress大学
WordPress大学
小众软件
小众软件
C
CERT Recently Published Vulnerability Notes
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Darknet – Hacking Tools, Hacker News & Cyber Security
F
Fortinet All Blogs
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Y
Y Combinator Blog
T
Threat Research - Cisco Blogs
Latest news
Latest news
Simon Willison's Weblog
Simon Willison's Weblog
Cyberwarzone
Cyberwarzone
S
Schneier on Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
L
Lohrmann on Cybersecurity
Stack Overflow Blog
Stack Overflow Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy International News Feed
J
Java Code Geeks
Spread Privacy
Spread Privacy
宝玉的分享
宝玉的分享
I
Intezer
L
LangChain Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
G
GRAHAM CLULEY
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
The GitHub Blog
The GitHub Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
N
News and Events Feed by Topic
AWS News Blog
AWS News Blog
Attack and Defense Labs
Attack and Defense Labs
Security Archives - TechRepublic
Security Archives - TechRepublic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

博客园 - wishma

SOAR平台初探(一) Logstash和Flume-NG Syslog接收小测试 Elasticsearch 填坑记 IBM TBSM 业务关联规则配置一例 免费实用微软系统工具集推荐(转) Netcool/OMNIbus Probe脚本编写例子(1) VMware vSphere开发(2)配置VMware vSphere Web Services SDK的开发环境 VMware vSphere开发(1)安装配置VMware vSphere Web Services SDK的运行环境 数字电视业务PSI/SI学习系列(转) SMI-S存储管理协议资料 strus2格式化数字和日期(转) - wishma - 博客园 IPhone数据库操作代码例子 NSDate常用代码范例 64位windows7连接网络共享打印机的问题 我的D630,安装MAC经历 Eclipse快捷键大全(转贴) (转贴)JIRA安装和破解,随便看看吧 CentOS上安装Tomcat,切换JDK的方法 哥不是间谍,哥只是在找信号!(转贴有意思)
IPhone 视图切换的的2种方法
wishma · 2010-05-29 · via 博客园 - wishma

IPhone中视图切换,网上常见的方法都是用viewcontrol,在viewcontrol中插入不同的视图实现,见下面的代码

 [self.view insertSubview:self.mainview.view atIndex:0];  

只要切换不同的mainview就可以实现,网上常见的方法也是如此,不过我却想用另外一种方法,就是直接操作window,

在window中切换view,实现方法如下:

 [viewController.view removeFromSuperview];
 [window addSubview:viewset.view];

其中viewController是当前窗口,首先从 父窗口中移除,然后调用window addSubview方法即可。

不过使用第二个方法,出现了一个问题就是原来的主窗口显示正常,但是切换到第二个窗口是,窗口被电池栏给覆盖了,显得很奇怪,目前无解。