Is it possible to add a small floating 'settings' button or image-button over a table view? I have buttons on a navigation bar up top, and i dont want to crowd that or remove any
            Asked
            
        
        
            Active
            
        
            Viewed 6,221 times
        
    2
            
            
        - 
                    I'm sure it possible. I would think it makes for a bad UI since it would intercept the touch over the table view. – Devraj Jul 23 '12 at 00:18
 - 
                    Best answer http://stackoverflow.com/a/35622509/2269679 – Manuel Escrig Feb 25 '16 at 08:57
 
3 Answers
1
            
            
        This is possible by adding it to the main window as a subview. Another option and my preferred method: Have a main wrapper view, the table view can be added to that wrapper view as a subview, then add your button as another subview inside of the wrapper view and voila
        Jose Rafael Santiago Jr.
        
- 771
 - 7
 - 12
 
0
            Perhaps adding a toolbar with buttons at the bottom would be a better approach?
        Erik
        
- 7,479
 - 8
 - 62
 - 99
 
- 
                    Yes, this is the best approach, dont make a bad UI http://iphonesdksnippets.com/post/2009/03/12/Add-toolbar-to-the-bottom.aspx – Teofilo Israel Vizcaino Rodrig Jul 23 '12 at 00:24
 - 
                    
 - 
                    @TeofiloIsraelVizcainoRodrig the link you provided wont work for me as i have a navigation toolbar already. – Whyrusleeping Jul 23 '12 at 00:41
 - 
                    It's not a navigation bar, maybe you mean a you have a UITabbar, in that case it would not work – Teofilo Israel Vizcaino Rodrig Jul 23 '12 at 00:44
 - 
                    
 - 
                    http://www.iphonesdkarticles.com/2008/09/navigation-controller-uitoolbar.html – Erik Jul 23 '12 at 01:21
 
0
            
            
        To use this method, you should inherit UIViewController and add tableview in it
(1)add button to self.tableview in viewDidLoad()
button.frame = CGRectMake(0, 0, 50, 50);
[self.tableview addsubview:button];  
[self.tableview bringSubviewToFront:button];
(2)set tableview delegate
self.tableview.delegate = self;
(3) add and update button location to self.tableview in scrollViewDidScroll delegate
button.frame = CGRectMake(0, 0, 50, 50);
[self.view addSubview:button];
[self.view bringSubviewToFront:button];
voila~
        JoeyJAL
        
- 194
 - 1
 - 9