Discussion Forums  >  Status Bar, Navigation Bar

Replies: 11    Views: 181

farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
06/06/13 01:43 AM (7 years ago)

How to remove back button on a plugin

Hi,

Nor sure if this has been posted before, couldn't find it on the search.
Anyway, if for some reason you want to remove the back button on the nav bar:

- Find your plugin on Xcode, open the .m file and locate "viewWillAppear".
- Just add the following just after the "configureBackgroundAndNavBar" bit and bob's your uncle!

[self.navigationItem setLeftBarButtonItem:[[UIBarButtonItem alloc] initWithCustomView:[[UIView alloc] init]]];

If you want to remove the back button from a specific screen, read this post:
<a href="https://www.buzztouch.com/forum/thread.php?tid=DE93AC8D52217E671CBBA8D&command=isSearching&currentPage=2&topicTitle=back&createdBy=&repliedBy=&minViews=-1&maxViews=-1&minReplies=-1&maxReplies=-1&forumCategory=" target="_blank" rel="nofollow">https://www.buzztouch.com/forum/thread.php?tid=DE93AC8D52217E671CBBA8D&command=isSearching&currentPage=2&topicTitle=back&createdBy=&repliedBy=&minViews=-1&maxViews=-1&minReplies=-1&maxReplies=-1&forumCategory=</a>

If you want to change the Back Button to say Name of last screen, read this post:
<a href="https://www.buzztouch.com/forum/thread.php?tid=CAD61AEEBC59230C26EEB5A&command=isSearching&currentPage=1&topicTitle=back&createdBy=&repliedBy=&minViews=-1&maxViews=-1&minReplies=-1&maxReplies=-1&forumCategory=" target="_blank" rel="nofollow">https://www.buzztouch.com/forum/thread.php?tid=CAD61AEEBC59230C26EEB5A&command=isSearching&currentPage=1&topicTitle=back&createdBy=&repliedBy=&minViews=-1&maxViews=-1&minReplies=-1&maxReplies=-1&forumCategory=</a>

If you want to change the Back Button image, read this post:
<a href="https://www.buzztouch.com/forum/thread.php?tid=ED67B72A1219A82729E2384&command=isSearching&currentPage=2&topicTitle=back&createdBy=&repliedBy=&minViews=-1&maxViews=-1&minReplies=-1&maxReplies=-1&forumCategory=" target="_blank" rel="nofollow">https://www.buzztouch.com/forum/thread.php?tid=ED67B72A1219A82729E2384&command=isSearching&currentPage=2&topicTitle=back&createdBy=&repliedBy=&minViews=-1&maxViews=-1&minReplies=-1&maxReplies=-1&forumCategory=</a>

Hope it helps.

Farcat
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/06/13 01:48 AM (7 years ago)
Nice! Thanks!

Cheers!

-- Smug
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
06/06/13 02:58 AM (7 years ago)
Sweet! Appreciate this so much.
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
06/06/13 03:00 AM (7 years ago)
This Kittsy fella needs to get a life and stop posting these code snippets lol
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
06/06/13 03:02 AM (7 years ago)
@farcat I knew you would be looking for this, after that fix yesterday.

I would use the first post in your situation so the back button won't be affected in other screens with the same screen type
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
06/06/13 03:04 AM (7 years ago)
@farcat

you might want to update the post and get rid of the extra html code..

it happens when you edit the post :(
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
06/06/13 03:04 AM (7 years ago)
My pleasure, I don't often have the opportunity to contribute to something new. :)

@Kittsy, I am going through your old posts like a madman keeping them safely in a special folder.
Sometime I open this folder just to look at the codes. My wife swears she heard me saying "My preciouuusssss" when looking at them....
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
06/06/13 03:11 AM (7 years ago)
you can send me them links because I can never find them either.
 
NeoZAZMatt
I hate code!
Profile
Posts: 9
Reg: Aug 01, 2013
Orlando
6,340
like
08/15/13 04:33 PM (7 years ago)
2 for 2! 2 questions I had last night, 2 answers found in the forums! You guys are fantastic!!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
08/15/13 05:54 PM (7 years ago)
"My Preciouuussssss" is gets funnier the longer I think about it. :)

Cheers!

-- Smug
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
03/29/14 03:46 PM (6 years ago)
Just what I needed for one of my plugins! Thank you for sharing!

Cheers,

David Van Beveren
https://btmods.com/chat
^ Chat with other BT Members live!
 
Janeen
Aspiring developer
Profile
Posts: 51
Reg: Jun 11, 2013
Southern Califo...
6,910
like
03/31/14 08:46 PM (6 years ago)
Gents,

Thank you for the excellent post! I'm trying to remove the back button within the Advanced Quiz plugin because I only want the Right Nav Button available to take you to the top level menu in my app.

I've searched in the NAD_advanced_quiz.m file for the "configureBackgroundAndNavBar" that is supposed to be just after the "viewWillAppear", but it's not there. In fact, it's not anywhere in the .m file.

Can you give me any tips as to how I can still remove that Back button from my top Nav bar?

Many thanks!
Janeen
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.