草庐IT

uiviewcontrollers

全部标签

在启动时,在UisplitViewController中提供了uiviewController,以进行动画启动屏幕

我有一个针对RootViewController的UisplitViewController!我不知道如何为动画启动屏幕介绍UiviewController!在appdelegate.swift我有:classAppDelegate:UIResponder,UIApplicationDelegate,UISplitViewControllerDelegate{varwindow:UIWindow?funcapplication(_application:UIApplication,didFinishLaunchingWithOptionslaunchOptions:[UIApplication

ios - 在自定义 UIViewController 转换期间隐藏状态栏

背景:我实现了一个自定义UIViewControllerTransition,其中第一个ViewController(VC1)有一个可见的状态栏overridefuncprefersStatusBarHidden()->Bool{returnfalse}而第二个呈现的ViewController(VC2)有一个隐藏的状态栏:overridefuncprefersStatusBarHidden()->Bool{returntrue}转换由用户控制,因为我使用手势Controller实现了拉动打开转换。目标:我希望在外观过渡和消失过渡期间隐藏状态栏(本质上类似于Googlemap滑出菜单)

ios - 如何在 Swift 的 uiviewcontroller 背景中显示自动滚动的图像?

在我的swift应用程序中,我有一个带有一些按钮和标签的UIViewController。我认为在背景中自动从右向左缓慢滚动(滑动)的图像会很酷。我设法将UIImageView置于背景中并分配了约束,以便它覆盖整个面板,但我不确定如何在其中滚动照片。我有一个比例为21:9的png文件-可以让它滚动吗? 最佳答案 在Swift中funcviewDidLoad(){Timer.scheduledTimer(timeInterval:3,target:self,selector:#selector(moveToNextImage),use

uiviewController在导航栏下方开始触摸后移动

我的视图(编程创建)从半透明的导航栏下方开始,但是当触摸/滚动的表视图时,将其滑入所需的位置。我的观点层次结构...UINavigationController--UIViewController(Container)----UIPageViewController------UIViewController(Detail)--------UIImageView--------UITableView(withcontentoffset)看答案也许UiviewController调整TableViewInsets存在问题。通常,当您在桌子上管理自己的插图时,应禁用ViewController自动

iOS:嵌入在 UIViewController 中的 Stripe 结帐 UI

来自https://stripe.com/checkout的附加屏幕截图,Stripe使您看起来可以将Stripe结帐UI嵌入ViewController中,但我无法在iOS的任何地方找到该UI的下降,它们仅提供javascript实现。有谁知道我在哪里可以获得iOS实现?截图: 最佳答案 Checkout是一个JavaScript库,您可以将其嵌入到网络应用程序中,或通过WebView嵌入到移动应用程序中。Stripe还有一个iOSSDK其中包括一个用于收集卡信息的预构建组件(STPPaymentCardTextField),但它

ios - 无法通过当前模态转换将图像传递给另一个 UIViewController

我试图将图像传递到目标UIView的另一个imageView,它连接到源UIView,超过当前模态segue。我试图通过segue传递数据,并通过Outlet在源UIView中设置图像(即NSData-核心数据),但我收到错误imagedescription在控制台中-"fatalerror:unexpectedlyfoundnilwhileunwrappinganOptionalvalue"//CodeofdestinationUIViewimportUIKitimportCoreDataclassReviewViewController:UIViewController{@IBOu

ios - 从 Storyboard模拟 UIViewController

我有一个关于在Storyboard中模拟单元测试中的UIViewController的问题。我在setUp()方法中像这样从Storyboard中加载了ViewController,这很好:varexampleVC:ExampleViewController!overridefuncsetUp(){super.setUp()exampleVC=storyboard.instantiateViewControllerWithIdentifier("exampleVC")as!ExampleViewControllerUIApplication.sharedApplication().ke

ios - 在没有 [[UIApplication sharedApplication] statusBarOrientation] 的情况下确定 UIViewController 的 UIInterfaceOrientation?

我有一些代码,我曾经使用presentingViewController.interfaceOrientation来确定当前UIViewController支持的界面方向。由于interfaceOrientation被弃用,我已经将该代码替换为[[UIApplicationsharedApplication]statusBarOrientation]并且它工作正常。但是,在iOS9和iOS8中,它不起作用(当我检查shouldAutorotateToInterfaceOrientation、supportedInterfaceOrientations和preferredInterfac

ios - 通过 SiriKit 启动应用程序时打开不同的 UIViewController

我正在尝试在我的iOS应用程序中实现SiriKit。当应用程序通过Siri启动时,我想打开一个不同的ViewController。如何在我的应用中处理此类操作? 最佳答案 你可以这样做,但是,首先你必须在你的应用程序中设置SiriKit,这是一个长长的指令列表:https://developer.apple.com/library/prerelease/content/documentation/Intents/Conceptual/SiriIntegrationGuide/index.html#//apple_ref/doc/ui

ios - 在 iPad 上锁定 UIViewController 方向

是否有任何方法可以在不选择Requiresfullscreen的情况下锁定iPad应用程序中的UIViewControllers之一的屏幕方向?我知道Requiresfullscreen是针对iPad多任务机制的。告诉我这是不是真的。我必须在多任务处理和锁定其中一个屏幕之间做出选择吗?我可以同时拥有这两种东西吗? 最佳答案 Imagehere在应用程序的一般信息中取消选择横向模式并仅选择纵向模式默认情况下,所有应用程序都兼容任何方向。您可以在常规>部署信息中选择方向。 关于ios-在iP