# \[Solved\] How to prevent going back to previous screen on IOS?

**URL:** <https://community.thunkable.com/t/solved-how-to-prevent-going-back-to-previous-screen-on-ios/1850019>\
**Category:** Questions about Thunkable X\
**Tags:** solved, beginner, question, howto\
**Created:** [April 26, 2022, 7:24pm UTC](https://community.thunkable.com/t/solved-how-to-prevent-going-back-to-previous-screen-on-ios/1850019 "2022-04-26T19:24:45Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![wlb01](https://avatars.discourse-cdn.com/v4/letter/w/919ad9/32.png) [@wlb01](https://community.thunkable.com/u/wlb01)\
**Post date:** [April 26, 2022, 7:24pm UTC](https://community.thunkable.com/t/solved-how-to-prevent-going-back-to-previous-screen-on-ios/1850019/1 "2022-04-26T19:24:45Z")

</div>

Hi, is there a way to dissable the user form going back to a previous sceen on IOS? im using thunkable X with the new drag and drop UI

---

<div class="post-metadata">

**Author:** ![mimostel](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mimostel/32/107661_2.png) [@mimostel](https://community.thunkable.com/u/mimostel)\
**Post date:** [April 26, 2022, 8:21pm UTC](https://community.thunkable.com/t/solved-how-to-prevent-going-back-to-previous-screen-on-ios/1850019/2 "2022-04-26T20:21:21Z")

</div>

You may use this block  
 ![screen](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/6/06a40c9baa7e041dbcfe3ed68e906c5410e66710.png)  
to put there any other action that prevents your app to use default action of back button… You may even tell to go to the same screen.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [April 26, 2022, 8:26pm UTC](https://community.thunkable.com/t/solved-how-to-prevent-going-back-to-previous-screen-on-ios/1850019/3 "2022-04-26T20:26:43Z")

</div>

> [@mimostel](#):
>
> You may use this block

In the documentation, this block is for Android only although I never tested it if it will work in iOS.

---

<div class="post-metadata">

**Author:** ![mimostel](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mimostel/32/107661_2.png) [@mimostel](https://community.thunkable.com/u/mimostel)\
**Post date:** [April 26, 2022, 8:27pm UTC](https://community.thunkable.com/t/solved-how-to-prevent-going-back-to-previous-screen-on-ios/1850019/4 "2022-04-26T20:27:27Z")

</div>

Ah, didnt knew it as I’m using only Android. My mistake if is not for iOS too 🤔

---

<div class="post-metadata">

**Author:** ![wlb01](https://avatars.discourse-cdn.com/v4/letter/w/919ad9/32.png) [@wlb01](https://community.thunkable.com/u/wlb01)\
**Post date:** [April 26, 2022, 10:37pm UTC](https://community.thunkable.com/t/solved-how-to-prevent-going-back-to-previous-screen-on-ios/1850019/5 "2022-04-26T22:37:01Z")

</div>

Thanks for the replies @mimostel @muneer , indeed that block only works for Android, so far I’ve seen nothing that prevents iOS users from going to previous screen by swiping

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [April 26, 2022, 11:12pm UTC](https://community.thunkable.com/t/solved-how-to-prevent-going-back-to-previous-screen-on-ios/1850019/6 "2022-04-26T23:12:40Z")

</div>

Are you using a Navigator?

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [April 26, 2022, 11:42pm UTC](https://community.thunkable.com/t/solved-how-to-prevent-going-back-to-previous-screen-on-ios/1850019/7 "2022-04-26T23:42:48Z")

</div>

What about a variable that holds the desired screen? Then on any screen load, check the variable and if it’s not the correct page, go to it.

---

<div class="post-metadata">

**Author:** ![wlb01](https://avatars.discourse-cdn.com/v4/letter/w/919ad9/32.png) [@wlb01](https://community.thunkable.com/u/wlb01)\
**Post date:** [April 27, 2022, 2:27pm UTC](https://community.thunkable.com/t/solved-how-to-prevent-going-back-to-previous-screen-on-ios/1850019/9 "2022-04-27T14:27:47Z")

</div>

I’m not

---

<div class="post-metadata">

**Author:** ![wlb01](https://avatars.discourse-cdn.com/v4/letter/w/919ad9/32.png) [@wlb01](https://community.thunkable.com/u/wlb01)\
**Post date:** [April 27, 2022, 2:29pm UTC](https://community.thunkable.com/t/solved-how-to-prevent-going-back-to-previous-screen-on-ios/1850019/10 "2022-04-27T14:29:21Z")

</div>

That’s an interesting approach, I’ll give it a try, thanks

---

<div class="post-metadata">

**Author:** ![wlb01](https://avatars.discourse-cdn.com/v4/letter/w/919ad9/32.png) [@wlb01](https://community.thunkable.com/u/wlb01)\
**Post date:** [April 27, 2022, 4:59pm UTC](https://community.thunkable.com/t/solved-how-to-prevent-going-back-to-previous-screen-on-ios/1850019/11 "2022-04-27T16:59:38Z")

</div>

It seems there is currently (and possibly never will be) no way of preventing the user from going to a previous screen on iOS, but there is a way to bring the user back to the desire screen, thanks to @jared fot the advice, I initialized a variable called activeScreen in the first screen and added a Control block, when the Screen1 opens, if the activeScreen variable is set to Screen 2, navigate to that screen and so on if you have any other numbers of screens, here is an example

[https://x.thunkable.com/projectPage/626972a36324fb00115a8a01](https://x.thunkable.com/projectPage/626972a36324fb00115a8a01)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [July 26, 2022, 4:59pm UTC](https://community.thunkable.com/t/solved-how-to-prevent-going-back-to-previous-screen-on-ios/1850019/12 "2022-07-26T16:59:54Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
