Swift: Back Button shows in Storyboard but not SimulatorTrigger a button click with JavaScript on the Enter key in a text box<button> vs. <input type=“button” />. Which to use?How to create an HTML button that acts like a link?Initialize a controller with my root controllerHow to detect tableView cell touched or clicked in swiftUpdate or reload UITableView after completion of delete action on detail viewHow to give different tags to buttons in different TableView cells in Swiftthread 1: exc_bad_instruction(code=exc_1386_invop,subcode=0x0)Textfield values set to empty when coming back from previous view controllerSwift vertical UICollectionView inside UITableView
What is the indigenous Russian word for a wild boar?
What does the behaviour of water on the skin of an aircraft in flight tell us?
Do creatures all have the same statistics upon being reanimated via the Animate Dead spell?
Points within polygons in different projections
Is there a rule that prohibits us from using 2 possessives in a row?
Team member doesn't give me the minimum time to complete a talk
Self-Preservation: How to DM NPCs that Love Living?
Is it possible to change original filename of an exe?
How crucial is a waifu game storyline?
The deliberate use of misleading terminology
Is there an explanation for Austria's Freedom Party virtually retaining its vote share despite recent scandal?
My player wants to cast multiple charges of magic missile from a wand
What is the intuition behind uniform continuity?
Select row of data if next row contains zero
Where can I find the list of all tendons in the human body?
Is there an evolutionary advantage to having two heads?
What does "tea juice" mean in this context?
Why is there a need to modify system call tables in linux?
Is the world in Game of Thrones spherical or flat?
Did airlines fly their aircraft slower in response to oil prices in the 1970s?
How to detach yourself from a character you're going to kill?
A "distinguishing" family of subsets
Rotated Position of Integers
How to capture more stars?
Swift: Back Button shows in Storyboard but not Simulator
Trigger a button click with JavaScript on the Enter key in a text box<button> vs. <input type=“button” />. Which to use?How to create an HTML button that acts like a link?Initialize a controller with my root controllerHow to detect tableView cell touched or clicked in swiftUpdate or reload UITableView after completion of delete action on detail viewHow to give different tags to buttons in different TableView cells in Swiftthread 1: exc_bad_instruction(code=exc_1386_invop,subcode=0x0)Textfield values set to empty when coming back from previous view controllerSwift vertical UICollectionView inside UITableView
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
Back Button shows in StoryBoard but not Simulator.
I added a segue from TableViewController
to DetailViewController
to pass data. The Storyboard automatically shows a Back Button on DetailViewController
, but when I run the Simulator, the button doesn't show up.
This is my Storyboard:
A closer look of TableViewController
and DetailViewController
:
But in my Simulator the button doesn't show up:
The hierarchy of the whole project:
I want to know where to configure the back button(in my segue?), or instead deleting the button(not letting it show in the Storyboard) so I can create one myself.
The code of my segue in my TableViewController
:
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)
performSegue(withIdentifier: "showDetailView", sender: indexPath)
override func prepare(for segue: UIStoryboardSegue, sender: Any?)
switch (segue.destination, sender)
case (let controller as DetailViewController, let indexPath as NSIndexPath):
controller.receivedName = storeList[indexPath.row].name!
controller.receivedDesc = storeList[indexPath.row].desc!
controller.receivedRate = storeList[indexPath.row].rate
controller.receivedUrl = storeList[indexPath.row].url!
default:
print("unknown segue")
break
ios swift button storyboard
|
show 7 more comments
Back Button shows in StoryBoard but not Simulator.
I added a segue from TableViewController
to DetailViewController
to pass data. The Storyboard automatically shows a Back Button on DetailViewController
, but when I run the Simulator, the button doesn't show up.
This is my Storyboard:
A closer look of TableViewController
and DetailViewController
:
But in my Simulator the button doesn't show up:
The hierarchy of the whole project:
I want to know where to configure the back button(in my segue?), or instead deleting the button(not letting it show in the Storyboard) so I can create one myself.
The code of my segue in my TableViewController
:
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)
performSegue(withIdentifier: "showDetailView", sender: indexPath)
override func prepare(for segue: UIStoryboardSegue, sender: Any?)
switch (segue.destination, sender)
case (let controller as DetailViewController, let indexPath as NSIndexPath):
controller.receivedName = storeList[indexPath.row].name!
controller.receivedDesc = storeList[indexPath.row].desc!
controller.receivedRate = storeList[indexPath.row].rate
controller.receivedUrl = storeList[indexPath.row].url!
default:
print("unknown segue")
break
ios swift button storyboard
use hierarchy debugger to check that there is no view appears on the top of the back button
– A.Munzer
Mar 24 at 10:06
Your table view controller is inside UINavigationController right?
– plamkata__
Mar 24 at 10:33
Also may you check that there is no UIAppearance configured for the navigation bar and the navigation items appearance is not configured to use the same color as the navigation bar
– plamkata__
Mar 24 at 10:35
Can you check your Storyboard segue kind? is it "show (Push)" or "show detail" or present modally? It should be Push if you want Back enabled.
– Anand
Mar 24 at 11:02
@Anand Hi, it's Show(Push)
– Vanessa Leung
Mar 24 at 12:01
|
show 7 more comments
Back Button shows in StoryBoard but not Simulator.
I added a segue from TableViewController
to DetailViewController
to pass data. The Storyboard automatically shows a Back Button on DetailViewController
, but when I run the Simulator, the button doesn't show up.
This is my Storyboard:
A closer look of TableViewController
and DetailViewController
:
But in my Simulator the button doesn't show up:
The hierarchy of the whole project:
I want to know where to configure the back button(in my segue?), or instead deleting the button(not letting it show in the Storyboard) so I can create one myself.
The code of my segue in my TableViewController
:
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)
performSegue(withIdentifier: "showDetailView", sender: indexPath)
override func prepare(for segue: UIStoryboardSegue, sender: Any?)
switch (segue.destination, sender)
case (let controller as DetailViewController, let indexPath as NSIndexPath):
controller.receivedName = storeList[indexPath.row].name!
controller.receivedDesc = storeList[indexPath.row].desc!
controller.receivedRate = storeList[indexPath.row].rate
controller.receivedUrl = storeList[indexPath.row].url!
default:
print("unknown segue")
break
ios swift button storyboard
Back Button shows in StoryBoard but not Simulator.
I added a segue from TableViewController
to DetailViewController
to pass data. The Storyboard automatically shows a Back Button on DetailViewController
, but when I run the Simulator, the button doesn't show up.
This is my Storyboard:
A closer look of TableViewController
and DetailViewController
:
But in my Simulator the button doesn't show up:
The hierarchy of the whole project:
I want to know where to configure the back button(in my segue?), or instead deleting the button(not letting it show in the Storyboard) so I can create one myself.
The code of my segue in my TableViewController
:
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)
performSegue(withIdentifier: "showDetailView", sender: indexPath)
override func prepare(for segue: UIStoryboardSegue, sender: Any?)
switch (segue.destination, sender)
case (let controller as DetailViewController, let indexPath as NSIndexPath):
controller.receivedName = storeList[indexPath.row].name!
controller.receivedDesc = storeList[indexPath.row].desc!
controller.receivedRate = storeList[indexPath.row].rate
controller.receivedUrl = storeList[indexPath.row].url!
default:
print("unknown segue")
break
ios swift button storyboard
ios swift button storyboard
edited Mar 24 at 12:40
Vanessa Leung
asked Mar 24 at 9:57
Vanessa LeungVanessa Leung
10110
10110
use hierarchy debugger to check that there is no view appears on the top of the back button
– A.Munzer
Mar 24 at 10:06
Your table view controller is inside UINavigationController right?
– plamkata__
Mar 24 at 10:33
Also may you check that there is no UIAppearance configured for the navigation bar and the navigation items appearance is not configured to use the same color as the navigation bar
– plamkata__
Mar 24 at 10:35
Can you check your Storyboard segue kind? is it "show (Push)" or "show detail" or present modally? It should be Push if you want Back enabled.
– Anand
Mar 24 at 11:02
@Anand Hi, it's Show(Push)
– Vanessa Leung
Mar 24 at 12:01
|
show 7 more comments
use hierarchy debugger to check that there is no view appears on the top of the back button
– A.Munzer
Mar 24 at 10:06
Your table view controller is inside UINavigationController right?
– plamkata__
Mar 24 at 10:33
Also may you check that there is no UIAppearance configured for the navigation bar and the navigation items appearance is not configured to use the same color as the navigation bar
– plamkata__
Mar 24 at 10:35
Can you check your Storyboard segue kind? is it "show (Push)" or "show detail" or present modally? It should be Push if you want Back enabled.
– Anand
Mar 24 at 11:02
@Anand Hi, it's Show(Push)
– Vanessa Leung
Mar 24 at 12:01
use hierarchy debugger to check that there is no view appears on the top of the back button
– A.Munzer
Mar 24 at 10:06
use hierarchy debugger to check that there is no view appears on the top of the back button
– A.Munzer
Mar 24 at 10:06
Your table view controller is inside UINavigationController right?
– plamkata__
Mar 24 at 10:33
Your table view controller is inside UINavigationController right?
– plamkata__
Mar 24 at 10:33
Also may you check that there is no UIAppearance configured for the navigation bar and the navigation items appearance is not configured to use the same color as the navigation bar
– plamkata__
Mar 24 at 10:35
Also may you check that there is no UIAppearance configured for the navigation bar and the navigation items appearance is not configured to use the same color as the navigation bar
– plamkata__
Mar 24 at 10:35
Can you check your Storyboard segue kind? is it "show (Push)" or "show detail" or present modally? It should be Push if you want Back enabled.
– Anand
Mar 24 at 11:02
Can you check your Storyboard segue kind? is it "show (Push)" or "show detail" or present modally? It should be Push if you want Back enabled.
– Anand
Mar 24 at 11:02
@Anand Hi, it's Show(Push)
– Vanessa Leung
Mar 24 at 12:01
@Anand Hi, it's Show(Push)
– Vanessa Leung
Mar 24 at 12:01
|
show 7 more comments
1 Answer
1
active
oldest
votes
Your initial view controller in the storyboard is actually the TabelViewController (you can see there is an arrow to it).
Thats' why when you start the scene and the TableViewController shows but it is not embedded in the navigation because the navigation controller has never been created.
Just change which is the initial view controller to be the navigation controller or any other before the navigation controller which holds the TableViewController.
You can just drag the arrow to change the initial controller in the storyboard
Oh yes, that's my problem! When I designed the TableViewController I set it as initial view so I could jump to it immediately on the simulator. But I forgot to change it back. Thank you sooo much!
– Vanessa Leung
Mar 24 at 13:22
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55322572%2fswift-back-button-shows-in-storyboard-but-not-simulator%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Your initial view controller in the storyboard is actually the TabelViewController (you can see there is an arrow to it).
Thats' why when you start the scene and the TableViewController shows but it is not embedded in the navigation because the navigation controller has never been created.
Just change which is the initial view controller to be the navigation controller or any other before the navigation controller which holds the TableViewController.
You can just drag the arrow to change the initial controller in the storyboard
Oh yes, that's my problem! When I designed the TableViewController I set it as initial view so I could jump to it immediately on the simulator. But I forgot to change it back. Thank you sooo much!
– Vanessa Leung
Mar 24 at 13:22
add a comment |
Your initial view controller in the storyboard is actually the TabelViewController (you can see there is an arrow to it).
Thats' why when you start the scene and the TableViewController shows but it is not embedded in the navigation because the navigation controller has never been created.
Just change which is the initial view controller to be the navigation controller or any other before the navigation controller which holds the TableViewController.
You can just drag the arrow to change the initial controller in the storyboard
Oh yes, that's my problem! When I designed the TableViewController I set it as initial view so I could jump to it immediately on the simulator. But I forgot to change it back. Thank you sooo much!
– Vanessa Leung
Mar 24 at 13:22
add a comment |
Your initial view controller in the storyboard is actually the TabelViewController (you can see there is an arrow to it).
Thats' why when you start the scene and the TableViewController shows but it is not embedded in the navigation because the navigation controller has never been created.
Just change which is the initial view controller to be the navigation controller or any other before the navigation controller which holds the TableViewController.
You can just drag the arrow to change the initial controller in the storyboard
Your initial view controller in the storyboard is actually the TabelViewController (you can see there is an arrow to it).
Thats' why when you start the scene and the TableViewController shows but it is not embedded in the navigation because the navigation controller has never been created.
Just change which is the initial view controller to be the navigation controller or any other before the navigation controller which holds the TableViewController.
You can just drag the arrow to change the initial controller in the storyboard
answered Mar 24 at 13:18
plamkata__plamkata__
272311
272311
Oh yes, that's my problem! When I designed the TableViewController I set it as initial view so I could jump to it immediately on the simulator. But I forgot to change it back. Thank you sooo much!
– Vanessa Leung
Mar 24 at 13:22
add a comment |
Oh yes, that's my problem! When I designed the TableViewController I set it as initial view so I could jump to it immediately on the simulator. But I forgot to change it back. Thank you sooo much!
– Vanessa Leung
Mar 24 at 13:22
Oh yes, that's my problem! When I designed the TableViewController I set it as initial view so I could jump to it immediately on the simulator. But I forgot to change it back. Thank you sooo much!
– Vanessa Leung
Mar 24 at 13:22
Oh yes, that's my problem! When I designed the TableViewController I set it as initial view so I could jump to it immediately on the simulator. But I forgot to change it back. Thank you sooo much!
– Vanessa Leung
Mar 24 at 13:22
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55322572%2fswift-back-button-shows-in-storyboard-but-not-simulator%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
use hierarchy debugger to check that there is no view appears on the top of the back button
– A.Munzer
Mar 24 at 10:06
Your table view controller is inside UINavigationController right?
– plamkata__
Mar 24 at 10:33
Also may you check that there is no UIAppearance configured for the navigation bar and the navigation items appearance is not configured to use the same color as the navigation bar
– plamkata__
Mar 24 at 10:35
Can you check your Storyboard segue kind? is it "show (Push)" or "show detail" or present modally? It should be Push if you want Back enabled.
– Anand
Mar 24 at 11:02
@Anand Hi, it's Show(Push)
– Vanessa Leung
Mar 24 at 12:01