0

我正在构建一个 iOS 应用程序,我正在对特定数据的存在性进行条件检查。请找到我用于 Android 的代码,此条件检查在内部完成SplashScreenActivty

if(data.exists())
{
     startActivity(new Intent(this,Activate.class))
}else{
     startActivity(new Intent(this,Tabs.class))
}

我如何在 iOS 中处理这个逻辑。我对选择模板感到困惑。我要不要一起去SplashScreenActivity。我还发现 iOS 没有像 SplashScreen 这样的东西。那么我该如何开始我的应用程序呢?

4

1 回答 1

1

There are two ways for this .

  • Follow first way, if you want to display splash image only.
  • Follow second way if you want to do some customisation programmatically in splash image

1:) Rename your image as Default.png

2:) Add new view controller with xib, write your stuff there in viewcontroller.m . Set timer using NSTimer & disappear it after your requiered time.

  • // For first way // I assume you are creating your app for iPhone environment only not for iPad or universal
  • // For second way // I assume you have not any click event

Enjoy Programmming

于 2012-11-03T06:46:16.973 回答