草庐IT

viewController

全部标签

ios - Swift - 显示另一个带有导航栏的 View Controller

我有两个ViewControllers--一个有Storyboard,一个没有。这两个ViewController在顶部都有自己的导航栏。现在,当我使用self.presentViewController(editorViewController,animated:true,completion:nil)时,我的editorViewController出现了,但没有导航栏。有什么办法解决这个问题吗? 最佳答案 我使用以下代码解决了这个问题:leteditorViewController=IMGLYMainEditorViewCont

ios - Swift - 显示另一个带有导航栏的 View Controller

我有两个ViewControllers--一个有Storyboard,一个没有。这两个ViewController在顶部都有自己的导航栏。现在,当我使用self.presentViewController(editorViewController,animated:true,completion:nil)时,我的editorViewController出现了,但没有导航栏。有什么办法解决这个问题吗? 最佳答案 我使用以下代码解决了这个问题:leteditorViewController=IMGLYMainEditorViewCont

iOS:返回上一个 View

我在StoryBoard中有两个这样的View:[View1]->[导航Controller]->[View2]要从View1(有tableview)转到View2,我通过单击View1上的一行来执行此操作:self.performSegueWithIdentifier("showmyview2",sender:self)这有效。现在我在View2上有一个按钮,单击该按钮时应该会返回到之前的View,即View1。我试过这个:navigationController!.popViewControllerAnimated(true)但这行不通。我如何返回第一View?

iOS:返回上一个 View

我在StoryBoard中有两个这样的View:[View1]->[导航Controller]->[View2]要从View1(有tableview)转到View2,我通过单击View1上的一行来执行此操作:self.performSegueWithIdentifier("showmyview2",sender:self)这有效。现在我在View2上有一个按钮,单击该按钮时应该会返回到之前的View,即View1。我试过这个:navigationController!.popViewControllerAnimated(true)但这行不通。我如何返回第一View?

ios - ( swift )PrepareForSegue : fatal error: unexpectedly found nil while unwrapping an Optional value

细节ViewController:@IBOutletvarselectedBundesland:UILabel!表格ViewController:overridefuncprepareForSegue(segue:UIStoryboardSegue!,sender:AnyObject!){if(segue.identifier=="BackToCalculator"){varvc:FirstViewController=segue.destinationViewControllerasFirstViewControllervc.selectedBundesland.text="Test

ios - ( swift )PrepareForSegue : fatal error: unexpectedly found nil while unwrapping an Optional value

细节ViewController:@IBOutletvarselectedBundesland:UILabel!表格ViewController:overridefuncprepareForSegue(segue:UIStoryboardSegue!,sender:AnyObject!){if(segue.identifier=="BackToCalculator"){varvc:FirstViewController=segue.destinationViewControllerasFirstViewControllervc.selectedBundesland.text="Test

ios - SWIFT/iOS : Parse XML data (RSS Feed) into clear text, 添加到带有图像和视频的 TextView

我环顾四周,我目前的情况是使用MWFeedParser,这是一个很棒的解析器。我的应用程序所做的是读取新闻网站提要,在表格中显示新闻故事,然后选择您想要的故事并在新的ViewController中显示完整故事。到目前为止,我已经关闭了此功能,但我正在努力处理文本。在对下载的XML数据使用.dataUsingEncoding(NSUTF16StringEncoding)之后,这会将不可读的文本变成清晰可读的文本。当我必须实现添加图像时,我的问题就出现了,我有一种方法可以获取图像并将其添加到标题旁边的TableView中的故事中,但我不知道如何保留结构我的完整故事ViewControlle

ios - SWIFT/iOS : Parse XML data (RSS Feed) into clear text, 添加到带有图像和视频的 TextView

我环顾四周,我目前的情况是使用MWFeedParser,这是一个很棒的解析器。我的应用程序所做的是读取新闻网站提要,在表格中显示新闻故事,然后选择您想要的故事并在新的ViewController中显示完整故事。到目前为止,我已经关闭了此功能,但我正在努力处理文本。在对下载的XML数据使用.dataUsingEncoding(NSUTF16StringEncoding)之后,这会将不可读的文本变成清晰可读的文本。当我必须实现添加图像时,我的问题就出现了,我有一种方法可以获取图像并将其添加到标题旁边的TableView中的故事中,但我不知道如何保留结构我的完整故事ViewControlle

ios - 当滑回根 viewController 时,大导航栏背景会变得清晰

我已经使用了largeNavigationBar并且在我滑回RootViewController并且大型导航以令人讨厌的方式获得清晰颜色之前一切正常。这是代码:funclargeNavigationTitle(){self.navigationController?.view.backgroundColor=VVUtility.navigationBarColor()letproductTitle=request?.product?.nameself.navigationItem.title="\(productTitle??"")".localized()self.navigatio

ios - 当滑回根 viewController 时,大导航栏背景会变得清晰

我已经使用了largeNavigationBar并且在我滑回RootViewController并且大型导航以令人讨厌的方式获得清晰颜色之前一切正常。这是代码:funclargeNavigationTitle(){self.navigationController?.view.backgroundColor=VVUtility.navigationBarColor()letproductTitle=request?.product?.nameself.navigationItem.title="\(productTitle??"")".localized()self.navigatio