Swift 2 to 3 Migration for prepareForSegue [duplicate]
up vote
2
down vote
favorite
This question already has an answer here:
prepare(for segue: UIStoryboardSegue, sender: AnyObject?) missing in swift 3.0/Xcode 8 b6
1 answer
This question might have been answered already but I could not find it.
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?)
This code worked fine in swift 2 but now gives me an error to remove the override.
Exact Error: "Method does not override any method from its superclass"
What is the new correct method for swift 3 for this? I can't seem to find any documentation on it anywhere.
swift swift2 segue swift3 ios10
marked as duplicate by Oleg Gordiichuk, vacawama
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Sep 28 '16 at 9:35
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
up vote
2
down vote
favorite
This question already has an answer here:
prepare(for segue: UIStoryboardSegue, sender: AnyObject?) missing in swift 3.0/Xcode 8 b6
1 answer
This question might have been answered already but I could not find it.
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?)
This code worked fine in swift 2 but now gives me an error to remove the override.
Exact Error: "Method does not override any method from its superclass"
What is the new correct method for swift 3 for this? I can't seem to find any documentation on it anywhere.
swift swift2 segue swift3 ios10
marked as duplicate by Oleg Gordiichuk, vacawama
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Sep 28 '16 at 9:35
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
thanks was looking all over for the answer on here.
– Joseph Astrahan
Sep 28 '16 at 9:33
You also could have used this feature of Xcode: Edit > Convert > To Current Swift Syntax...
– Tobi
Sep 28 '16 at 9:46
That feature didn't work for some reason when I tried.
– Joseph Astrahan
Sep 30 '16 at 19:38
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
This question already has an answer here:
prepare(for segue: UIStoryboardSegue, sender: AnyObject?) missing in swift 3.0/Xcode 8 b6
1 answer
This question might have been answered already but I could not find it.
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?)
This code worked fine in swift 2 but now gives me an error to remove the override.
Exact Error: "Method does not override any method from its superclass"
What is the new correct method for swift 3 for this? I can't seem to find any documentation on it anywhere.
swift swift2 segue swift3 ios10
This question already has an answer here:
prepare(for segue: UIStoryboardSegue, sender: AnyObject?) missing in swift 3.0/Xcode 8 b6
1 answer
This question might have been answered already but I could not find it.
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?)
This code worked fine in swift 2 but now gives me an error to remove the override.
Exact Error: "Method does not override any method from its superclass"
What is the new correct method for swift 3 for this? I can't seem to find any documentation on it anywhere.
This question already has an answer here:
prepare(for segue: UIStoryboardSegue, sender: AnyObject?) missing in swift 3.0/Xcode 8 b6
1 answer
swift swift2 segue swift3 ios10
swift swift2 segue swift3 ios10
asked Sep 28 '16 at 9:29
Joseph Astrahan
3,13623278
3,13623278
marked as duplicate by Oleg Gordiichuk, vacawama
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Sep 28 '16 at 9:35
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Oleg Gordiichuk, vacawama
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Sep 28 '16 at 9:35
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
thanks was looking all over for the answer on here.
– Joseph Astrahan
Sep 28 '16 at 9:33
You also could have used this feature of Xcode: Edit > Convert > To Current Swift Syntax...
– Tobi
Sep 28 '16 at 9:46
That feature didn't work for some reason when I tried.
– Joseph Astrahan
Sep 30 '16 at 19:38
add a comment |
thanks was looking all over for the answer on here.
– Joseph Astrahan
Sep 28 '16 at 9:33
You also could have used this feature of Xcode: Edit > Convert > To Current Swift Syntax...
– Tobi
Sep 28 '16 at 9:46
That feature didn't work for some reason when I tried.
– Joseph Astrahan
Sep 30 '16 at 19:38
thanks was looking all over for the answer on here.
– Joseph Astrahan
Sep 28 '16 at 9:33
thanks was looking all over for the answer on here.
– Joseph Astrahan
Sep 28 '16 at 9:33
You also could have used this feature of Xcode: Edit > Convert > To Current Swift Syntax...
– Tobi
Sep 28 '16 at 9:46
You also could have used this feature of Xcode: Edit > Convert > To Current Swift Syntax...
– Tobi
Sep 28 '16 at 9:46
That feature didn't work for some reason when I tried.
– Joseph Astrahan
Sep 30 '16 at 19:38
That feature didn't work for some reason when I tried.
– Joseph Astrahan
Sep 30 '16 at 19:38
add a comment |
1 Answer
1
active
oldest
votes
up vote
6
down vote
accepted
Method signature is changed in swift 3.0
Replace this
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
With
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
6
down vote
accepted
Method signature is changed in swift 3.0
Replace this
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
With
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
add a comment |
up vote
6
down vote
accepted
Method signature is changed in swift 3.0
Replace this
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
With
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
add a comment |
up vote
6
down vote
accepted
up vote
6
down vote
accepted
Method signature is changed in swift 3.0
Replace this
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
With
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
Method signature is changed in swift 3.0
Replace this
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
With
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
answered Sep 28 '16 at 9:32
Sahil
6,27931525
6,27931525
add a comment |
add a comment |
thanks was looking all over for the answer on here.
– Joseph Astrahan
Sep 28 '16 at 9:33
You also could have used this feature of Xcode: Edit > Convert > To Current Swift Syntax...
– Tobi
Sep 28 '16 at 9:46
That feature didn't work for some reason when I tried.
– Joseph Astrahan
Sep 30 '16 at 19:38