Tabs as buttons on UITabBar

Hi,
there's any way to make the tabs in an UITabBar behavior like buttons? I mean, normally, when one tab is selected it highlights and stays selected and highlighted until a new tab is selected and steal the focus. Everytime a tab is selected it generates an event. If the user clicks a tab that is already selected it will never generate an event.
What I need is a tab that can be unselected, unhighlighted and that can generate an event, even if it is already selected. Is that possible?

As far as generating an event even when selected, here's one way to do it. The trick is getting access to the tab bar controller's tab bar so you can act as its delegate (the tab bar controller API doc says "you should never need to, nor should you, access the tab bar directly", but I can't figure out any other way).
In your UITabBarController subclass:
-(void)loadView
[super loadView];
UIView *tabBar = [self rotatingFooterView];
if ([tabBar isKindOfClass:[UITabBar class]]) {
((UITabBar *)tabBar).delegate = self;
- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
// this is called when the user taps a tab bar button,
// whether it's current or not

Similar Messages

  • Safari 5.1.2 Tab Close Button on Different Sides in Windows

    I'm not sure if this is unique to my computer(s), but I've noticed that the tab close button is on different sides in the Mac & Windows versions of Safari. On my Mac, the close button is on the Left-Hand side with the tab text centered on the tab. On my Windows, the close button is on the Right-hand side with the tab text justified to the left.
    Why the difference in UI? I do quite a bit of browsing on both computers and I find that I'm constantly having to try to remember where I am to determine where the stupid close button is.
    I've looked around in both the Mac & Windows versions and I can't find an option that specifies where the button is show and whether the text is justified or not.

    OK, here's what I'm talking about. This is a screen capture of a tab from the Macintosh version of Safari:
    Notice how the "X" to close the tab is on the left-hand side and the text of the tab is centered on the width of the tab.
    Here is a screenshot of the Windows version of Safari:
    You can see how the tab is much smaller for one, but also how the text is justified to the left with the "X" to close the tab appearing on the right side of the tab instead of the left.
    I don't really prefer one over the other (ie. left or right side), I just wondered if there's some setting to make them act the same way on both so that I don't have to constantly remember what OS I'm on in order to remember where the darn "X" is to close the tab.

  • Tabs and buttons on Arch website(s)

    The tabs and buttons in the top right corner have links such that the tabs and buttons to which they belong are not clickable across their entire surface. Only the text part is clickable, but the image on which the text is placed is not.
    I haven't analyzed the code, but I guess the elements can be made clickable across their entire surface if you made links themselves (instead of the parent block element) into block elements and applied the images as blacground image. E.g.:
    <a href="yada yada" class="tab">Home</a>
    .tab {
      display: block;
      width: something;
      height: somethingelse;
      background-image: url(yadayada);
    Sorry if I mistyped anything, I'm really sleepy. The post might be a bit confusing for the same reason...
    Last edited by foxbunny (2007-10-20 01:15:18)

    Try this:
    #main_nav ul li {
    display: block; <----- EDIT: maybe "display: inline;" here?
    float: right;
    width: 67px;
    height: 20px;
    #main_nav ul li a {
    display: block;
    width: 67px;
    height: 20px;
    background: url("http://archlinux.org/media/tab.png") repeat-x bottom left #fbf8f1;
    padding-top: 1px;
    padding-bottom: 1px;
    margin-left: 3px;
    text-align: center;
    font-size: 13px;
    I haven't had time to test this, but if you could toss me the templates, I could probably work on it some more. Meanwhile, try the fix above and tell me if it works.
    Last edited by foxbunny (2007-10-22 13:48:18)

  • Can't get tab group button showing up

    Hi,
    My tabs are organized in groups of topics.
    Usually, I have a "tab group" button that appears on the tab bar, to open the "panorama" and switch between groups.
    I recently noticed that if I have more than one tab row, this button does not show up.
    I tried the View > Toobars > Customize menu, but strangely enough, when this contextual window opens, the tab group button suddenly reappears on the tab bar of the main window, and of course is not listed in the customize menu.
    As soon as I leave the menu, the button disappears from my tab bar :-(
    If I switch (CTRL+Shift+E) to the panorama and select a group with a few tabs (so that they fit on one line in the tab bar), then my tab group button is visible again.
    I suppose I can leave with the keyboard shortcut, but nevertheless I'd like to restore that button right.
    Any help appreciated!
    Thx.

    You can check for problems caused by a corrupted localstore.rdf file.
    *http://kb.mozillazine.org/Corrupt_localstore.rdf

  • Where is the new tab toolbar button in firefox 6x

    in firefox 4.x there is a toolbar button for new tab, where is the button in firefox 6.x?
    can this be downloaded as a add-on or theme?

    You can find the New Tab button showing as a '+' on the Tab bar.
    You can open the Customize window and drag the New Tab button that shows as a plus sign (+) from the Tab bar on another toolbar and it will become a regular toolbar button like the New Tab button that you have in Firefox 3 versions.
    If you can't find the New Tab button then click the "Restore Default Set" button in the Customize window.
    If you want the New Tab button at the far right end of the Tab bar then place a flexible space to the left of it.
    * New tab toolbar button: https://addons.mozilla.org/firefox/addon/new-tab-toolbar-button/

  • The open new tab (+ sign button) unexpectedly stopped working when I click on the + sign why?

    The + sign button that opens a new tab (called Untitled) stopped working. When I go to File, and click on New Tab, that does not work either. I checked the Options and made sure the "Open new window in new tab instead was checked. I tried System Restore, and I downloaded and installed Firefox 5.0. The + sign still does not work. This problem in on my desktop. I checked my laptop and the open new tab + sign button is working fine. What is happening?

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    In Firefox 4+ you can use one of these to start in <u>[[Safe mode]]</u>:
    * Help > Restart with Add-ons Disabled
    * Hold down the Shift key while double clicking the Firefox desktop shortcut (Windows)
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • I dragged my tabs into the "Tab Group" button and now cant find those tabs but they are there in Firefox Home.

    I probably did this wrong since i just started using Firefox, but i dragged a tab into the Tab Groups button on my tool bar and lost all of the tabs when viewing on my laptop. When viewing on my smartphone can still view them in Firefox Home, please help.

    The app tabs feature is still in a relatively early stage of development. The option to remember app tabs independently of sessions has not yet been implemented, but it will be part of the release version of Firefox 4.

  • In Firefox version 4.0.1 (Mac OSX 10.6.7) I cannot find the "New Tab" tool button in Customize Toolbars.

    In Customize Toolbars there is no longer a New Tab tool button to place on the tool bar, there is only a New Window tool button. Has this been deleted from the latest version?

    Is Mail still "spinning"?  If it's been doing that for a while, I'd kill it, using either Activity Monitor or the OS X application picker.  Then relaunch Mail and see what happens.
    Two "by the ways":
    1) Your system details mention an PPC iMac.  Since a non-Intel Mac can't run OS X 10.6, you seem to have another Mac.  You might want to consider updating your system details.
    2) You seem to have been misled by the poor labeling of the message composition fields on this forum into trying to enter your entire post into the "subject" field.  In the future, just enter a summary of your post there and the main text into the field below it.

  • Close Tab "x" button gone in firefox 25 - moved to the top right - very annoying

    The close tab "x" button in firefox 25 is now always in the top right corner of the window, this is very annoying and counter productive.
    Is there any way to have the "x" on tabs restored like every single version before this had?

    Do you have the "Hide Tab Bar with One Tab" Extension? as the developer is trying fix the extension.
    http://forums.mozillazine.org/viewtopic.php?p=13204325#p13204325

  • Middle mosue button don't open a link on a new tab, the button works for scrolling etc.

    Middle mosue button don't open a link on a new tab, the button works for scrolling etc. Thats teh problem, seem like I'm the only with the problem...

    I had the same problem. If you're running Greasemonkey, you need to update it. There's a conflict between Greasemonkey 0.9.10 and Tab Mix Plus on Firefox 6.0.2. Until the add-ons site approves Greasemonkey 0.9.11, you'll have to install it manually.
    [https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/versions/0.9.11 Greasemonkey 0.9.11]
    [http://turbulentsky.com/middle-clickcmdclick-on-a-link-doesnt-open-tabs-in-firefox-6-0-2.html Middle-click/Cmd+click on a Link Doesn’t Open Tabs in Firefox 6.0.2]

  • Cannot open a new tab using + button. I was able to do it before.

    When I try to open a new tab using + button nothing happens. I used to be able to do it.

    That is a problem with the Ask<i></i>.com toolbar (Tools > Add-ons > Extensions)
    See:
    * [[Troubleshooting extensions and themes]]

  • Problems with Safari, tabs, radio buttons, etc.

    My goal is (as you probably guessed) to have a script that unite all open windows/tabs in the frontmost window. I know at least of two theoretical ways to do this, but neither works for reasons I don't understand:
    1. GUI scripting. Use Safari's menus to navigate through tabs. For some reason this works somewhat randomly, sometimes getting all tabs and sometimes one tab per window. I can get it working in an awkward way that removes all windows before opening a new one: not exactly what I want to do.
    2. I have found this one browsing for solutions on the web, and it uses the System Events app. It seems that Safari tabs are "radio buttons". However, the number of radio buttons returned is always 0. Also, reading the URL with the line
    value of text field 1 of group 1 of splitter group 1 of window 1
    does not work (returns NSReceiverEvaluationScriptError: 4).
    So, does anyone have any ideas on what goes wrong? (or even better, does anyone have a script that works?)
    Mac mini Core Duo   Mac OS X (10.4.7)  

    Thanks Cyclosaurus, this seems to work!
    There is still one problem: when getting the URL of a window, if it is empty it will throw an "undefined variable" error. How can I avoid this? (I cannot even check if the url is empty because it is undefined.)
    Here is the script I have so far, if anyone is interested:
    tell application "System Events"
    tell process "Safari"
    try
    -- finding the group
    set tab_group to 0
    repeat with g from 1 to count of groups of window 1
    if buttons of group g of window 1 is not {} and title of button 1 of group g of window 1 is not "" then
    set tab_group to g
    exit repeat
    end if
    end repeat
    set URL_list to {}
    set N to count of windows
    repeat with w from N to 2 by -1 -- going through windows
    set T to count of buttons of group tab_group of window w
    repeat with b from 1 to count of buttons of group tab_group of window w -- going through tabs
    click button b of group tab_group of window w
    tell application "Safari" to set this_URL to URL of document w
    if URL_list does not contain this_URL then copy this_URL to end of URL_list
    end repeat
    tell application "Safari" to close window w
    end repeat
    set C to count of URL_list
    repeat with i from 1 to C
    my new_tab()
    tell application "Safari" to set URL of document 1 to item i of URL_list
    end repeat
    on error the error_message number the error_number
    display dialog the error_message buttons {"OK"} default button 1
    end try
    end tell
    end tell
    on new_tab()
    tell application "Safari" to activate
    tell application "System Events"
    tell process "Safari"
    click menu item "New Tab" of menu "File" of menu bar 1
    end tell
    end tell
    end new_tab
    Mac mini Core Duo   Mac OS X (10.4.8)  

  • What happend to the per tab history button?

    I upgraded to Firefox 4 and noticed the per-tab history button which if you clicked on it would list all the sites that had been visited in that individual tab and would allow you to quickly select a site and go back to it has been removed! It was on the left of the tab bar just to the left of the "<" button and it looked like how the current "List all tabs" button looks. This feature was SO useful, now if I want to go and see all the sites I visited in a tab historically I must keep clicking the back arrow button which is much less efficient. Developers PLEASE ADD THIS BACK!!!

    Click-hold or right-click the Unified Back / Forward button to see the "history" in that tab. Or, you can install this extension which restores the drop-marker arrow. <br />
    https://addons.mozilla.org/en-US/firefox/addon/backforedrop/

  • Tab Groups Button is missing

    There used to be a Tab Group Button on the right side of the Firebox tab strip. This is supposed to be right above the List All Tabs arrow. Ever since I upgraded Firefox to 8 it's disappeared. I can get to other tab groups by using the arrow and then selecting Tab Groups, but there used to be an icon that brought this up in one step. How do I get it back?

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * [[Troubleshooting extensions and themes]]

  • Double Clicking Tab Scroll button

    Well, it's not really that big of a problem, but I guess I've finally decided to try and solve this. I've spent some time skimming through the links I got from the Help section, Google, and 'About:Config'.
    But most of that ends up on something unrelated--moving on though,
    my problem is simple: I really hate it when I double click the 'Scroll buttons' (What are these called anyway?) (the buttons next to the tabs on the far left and far right side in the tab-bar) it scrolls over an entire page instead of, as in the old days, would just scroll over two tabs.
    Some people may like this, but it's not my thing. Anyway, I hope I was articulate enough that my problem is clear.
    '''Summary''': I really dislike the fact that when the 'tab-scroll-button' is double clicked it scrolls a page, rather than just two tabs.
    Truly and Fishily yours,
    Fish Kiler

    See:
    * http://kb.mozillazine.org/toolkit.scrollbox.scrollIncrement
    * http://kb.mozillazine.org/toolkit.scrollbox.smoothScroll

Maybe you are looking for

  • Macbook doesn't recognize external display

    I am trying to use my tv as an external display. My Intel Macbook doesn't detect my tv as an external display, this is because I am using an unconventional connector (VGA to RCA connector). Anyways, I am wondering if there is a way to force my laptop

  • When text is low on the page, it does not print on the page!

    Office Jet J6480, Windows 7 32 bit. Sometimes pages with a content line near the bottom of the page, does not print or the characters are only partially printed on the output page.

  • Exchange Server 2010 mailflow reporting using SCOM 2007

    Hi, We are using SCOM 2007R2 in our Organization and we are Monitoring Exchange server 2010. We are in need of reports for Mailflow statistics (send and receive)from Exchange server 2010 using SCOM 2007R2. Eg: Microsoft Exchange 2010 Server Reports T

  • 3gs upgrade to os4 won't sync music or photos anymore

    since upgrading to os4 my 3gs won't sync music and photos. a sync completes successfully and other things like contacts, calender etc all sync fine. but my folders of photos i want synced to the phone don't appear in the photos app anymore... and als

  • Credit card charged for $80, not on bill or owed

    While going through my credit card transactions, I found a charge for ~$80. I looked at the bill from comcast and nothing shows that I paid or owed those $80. I would call customer service but I work during the hours that it is open. I was thinking o