Use Table View Disclosure Indicator Style for Uibutton iOS

Use table view disclosure indicator style for uibutton ios

Note that you must use a transparent background

Here's the best possible match I can get, in a photoshop file:

Note that it includes the REAL iOS IMAGE (from a screenshot) underneath as a layer, so you can compare.

http://www.filedropper.com/fakearrowiosnov2013psd


It seems like VBK wants the single chevron from the UITableView collection. Which is called 'Disclosure Indicator' as opposed to the one available from UIButton which is 'Detail Disclosure'.

I think you want something like this:

UITableView Disclosure Indicator Image for Buttons

It is 50x80 with a transparent background. Use this image on top of a button or UIImageView. Resize it to whatever size you'd like your button to be. Apple recommends a hit target of no less than 40x40. I sized it to 10x16 in my storyboard, but I am using a transparent button overlay so the size doesn't matter.

Image Mirror : http://imgur.com/X00qn0Z.png


Just note however this is not precisely the image used in iOS7. (Nov 2013.) To get the exact image, simply run an app in retina in your simulator, and make a screenshot.

Segue from Table View Cell xib with disclosure Indicator to storyboard

Just use didSelectRoWAtIndexPath method of table view …DO something like this..

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
NSString* viewType = @"YourVCIdentifier";//u can have ContactVC or NavC as other options depending on ur condition
UIViewController* viewController = [storyboard instantiateViewControllerWithIdentifier:viewType];

[self.navigationController pushViewController:viewController animated:YES];

}

that will do it

How do I get a disclosure indicator in my tableview header section?

If you already customized your header view you can simply add a custom UIButton with an image of a discloure indicator add add it as a subview to your header view.

If you need further help you are most welcome.

EDIT
Jonathan is right, the UIButton has a UIButtonTypeDetailDisclosure so there is no need for a custom image.

Swift UITableViewCell view behind Disclosure Indicator background is not changing in bright mode

Instead of assigning color to contentView of UITableViewCell, use this

self.backgroundColor = UIColor.systemGray6

Your background color of cell will show below the accessoryType

How to give action to tableview row and how to add Add disclosure indicator in it?

check following answer..!

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{

UITableViewCell *cell= [self.tableview1 cellForRowAtIndexPath:indexPath];

[self.button setTitle:cell.textLabel.text forState:UIControlStateNormal];
self.tableview1.hidden=YES;

if(tableView == _tableview1)
{
if(indexPath.row==0)
{
self.tableview1.hidden=YES;
self.tableview2.hidden=NO;
if(indexPath.row==0)
{
// cell.textLabel.text = [self.arr2 objectAtIndex:indexPath.row];

}
// cell.textLabel.text = [self.arr2 objectAtIndex:indexPath.row];

}

//cell.textLabel.text = [self.arr1 objectAtIndex:indexPath.row];
//self.tableview2.hidden=YES;
}
if(tableView == _tableview2)
cell.textLabel.text = [self.arr2 objectAtIndex:indexPath.row];

}


Related Topics



Leave a reply



Submit