[iOS] Is there a function to finish a UIviewcontroller like in android?
Not quite. In iOS land you have to more explicitly call viewController.dismissViewControllerAnimated(true, completion: nil)
if your view controller is a modal or one of the various dismissal methods on UINavigationController if your viewController was pushed on to the screen.
In Swift 3 this function is:
viewController.dismiss(animated: true)
If you want to go back to the previous view controller
_ = navigationController?.popViewController(animated: true)
If you want to go back to the root view controller
_ = navigationController?.popToRootViewController(animated: true)
相關推薦
[iOS] Is there a function to finish a UIviewcontroller like in android?
Not quite. In iOS land you have to more explicitly call viewController.dismissViewControllerAnimated(true, completion: nil) if your view controller is a m
Given two strings s and t, write a function to determine if t is an anagram of s.
Given two strings s and t, write a function to determine if t is an anagram of s. For example, s = "anagram", t = "nagaram", return tru
Is there a way to avoid undeployment memory leaks in Tomcat?
tomcat 專案部署問題 - yshy - 部落格園http://www.cnblogs.com/yshyee/p/3973293.html jsp - tomcat - their classes from previous runs are still loaded in memory - Stack
How can I count the time it takes a function to complete in Java?
要知道 一個 function 需要執行多少個 ms, 用下面的程式就可以了,滿方便的。 long startTime = System.currentTimeMillis(); doReallyLongThing(); long endTime = System.currentTimeMil
[Python Cookbook] Numpy: How to Apply a Function to 1D Slices along the Given Axis
Here is a function in Numpy module which could apply a function to 1D slices along the Given Axis. It works like apply funciton in Pandas.
Ask HN: Is Wetware Computing going to make a come back with the rise of ML?
I was reading about Wetware Computing, https://en.wikipedia.org/wiki/Wetware_computer, and it seems like some of the bottlenecks at the time that prevented
iOS AppStore稽核被拒To provide a link to a demo video
發件人 Apple 0. 4.0 BEFORE YOU SUBMIT: INFO NEEDED Information Needed We began the review of your app but are not able to continue because
is there any way to stop auto block
class ret report 錯誤日誌 ado null error: eal any shadowsocks出現錯誤日誌 tail /var/log/ssserver.log 2017-07-02 12:36:31 ERROR: block all reques
java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.
按照黑馬的視訊學習做專案,第一步搭建環境時候。寫好JdbcUtils,測試是否能連線資料庫時候。發現一執行main方法,程式就卡住了,接著就會出以下這2個錯誤:(main方法裡是想輸出 getConnection方法的返回值,也就是connection的雜湊值,這樣就代表獲取連線成功了。
Antarctic Site Dome A Promises to Open a New Window on the Remote Automation Cosmos
www.inhandnetworks.com Equipment deployed at Dome A in Antartica, a site as high as Maunakea and 10 times drier, showed that it would be an idea
How Technology Led a Hospital To Give a Patient 38 Times His Dosage
How Medical Tech Gave a Patient a Massive OverdosePablo Garcia went to the hospital feeling fine. Then the hospital made him very sick.The nurses and docto
The "data" option should be a function that returns a per-instance value in component definitions
Vue 中 data 使用物件形式報錯 報錯資訊:The "data" option should be a function that returns a per-instance value in component definitions export default { na
I have a dream to be a real man,a man of.....
前兩天終於收到IT生涯的第一份offer了,回顧自己的求職和自學之路,真實充滿了坎坷。 經歷了3次面試,第三次終於成功了。三次面試的公司都是51job,且都沒有投對方簡歷,都是HR自己搜尋的,自己偷了
How to Correctly Use SQL's like in Android
Yesterday I stumbled about the correct usage of the LIKE-statement in conjunction with selectionArgs. My first attemp
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory
手動新增maven構件報錯 [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Windows\System32). Ple
[iOS] How to make a Global function in Swift
You can create a custom class with the method you need like this: class MyScene: SKScene { func CheckMusicMute() { if InGameMusicOnOff == tr
[iOS] Pass optional block or closure to a function in Swift
古時候objective-c 寫法: - (void)hardProcessingWithString:(NSString *)input withCompletion:(void (^)(NSString *result))block; [object hardProcessingWithStrin
Ask HN: Is there a good alternative to software registration keys?
Take a 24-bit key, for ease of example. Split it into three 8-bit sub keys. Make a list of 256 english words. Assign a word to each subkey.1101 1000 = chai
Ask HN: Is there a modern “power on to basic” computer, for kids to learn on?
Somewhat affluent kids maybe. As a preteen in the 90s I had an uncle's hand-me-down 80s console (NES) with like two cartridges and 80s computer with a few
Ask HN: Is there any real value to a company in SSL beyond Let's Encrypt?
I think few users know or care what certification authorities (CAs) signed the certificates of the websites they visit. Using a public CA other than Let’s