1

I'm kinda new to iOS and iPhone aswell, and don't have much experience with how the apps usually respond to events.

What my question is; when a user taps the detail accessory button in a table view, what should I do? What does the apps usually show?

Almost the only logic response I can think of is:

  1. Open an alert-view with the info i want to present.

Is this considered the "right approach"? Will the normal iOS-user feel comfortable with this?

EDIT:

Also, I just found out. The actual "Details" accessory button only seems to be shown in iOS7?! If I want backwards compatibility with this, I guess i have to go for the details disclosure button, which has the little arrow next to it. This is wierd. What is the difference between the details disclosure and the details accessory?

ullstrm
  • 9,812
  • 7
  • 52
  • 83
  • If you have difficulties imagining a response, then why display the accessory button at all? – herzbube Sep 03 '13 at 07:20
  • With that logic - I shouldn't make iOS apps before I've used iPhone alot. See: "I'm kinda new to iOS and iPhone aswell, and don't have much experience with how the apps usually respond to events." – ullstrm Sep 03 '13 at 07:25
  • I misread your question like this: "Although I don't need it, the UI displays this accessory button. I am an iOS newcomer, so I don't know that I can hide the button, therefore I *must* code some response, although I can't imagine what it should be." Thanks for your comment, it clarifies the question. – herzbube Sep 03 '13 at 08:03

6 Answers6

1

A good reference for what a user expects for an iOS UI element is the iOS Human Interface Guidlines:

https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/UIElementGuidelines/UIElementGuidelines.html#//apple_ref/doc/uid/TP40006556-CH13-SW1

Personally, and in agreement with the guidelines, I think users will find the alert view less pleasant than a simple animated description or a new view. People hate pop-ups, and a UIAlertView is very alarming and disruptive to the user's app experience.

I think the nicest thing would be to move other elements that are below the box downwards and include a description or extra info. The best option depends very heavily on the rest of the UI, though.

Lugubrious
  • 380
  • 1
  • 3
  • 16
  • Also, if I was to use the approach "move other elements that are below the box downwards and include a description or extra info.". Is there any standard way of doing this? Any tutorials or so? :) – ullstrm Sep 03 '13 at 07:45
  • Well, what exactly will the details button show? I think a standard way of doing this is to set an animation block and move other items. http://www.raywenderlich.com/5478/uiview-animation-tutorial-practical-recipes <- animation tutorial – Lugubrious Sep 03 '13 at 17:42
0

You can show the details of the selected item by navigating to another view controller. For example if the user has selected a name from the contact list then on clicking on the accessory view navigate the user to new screen for showing the other contact details of the selected user.

Mayur Shrivas
  • 199
  • 1
  • 13
0

generally you are free to write your own code while you tap on accessory button in a table view but if you ask in general manner then pushing a viewcontroller is the thing people do in regular basis while on tap on accessory button or row of that index.

D-eptdeveloper
  • 2,430
  • 1
  • 16
  • 30
0

Table cells are to display very minimal & important quick glance datas - as the name suggests as 'detail accessory button', give out finer details on its selection.

Its all about differentiating between coarse-grained and fine-grained information.

thatzprem
  • 4,697
  • 1
  • 33
  • 41
0

you can write your own code so that the detail button can do anything you like.

the method that take care of that is

-(void)tableview: accessoryButtonTappedForRowWithIndexPath:

this respond to the touch of the accessorybutton in a row.

for example, this code will get you a message when the user tap that button.

 -(void)tableview:(Tableview *)tableview accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexpath {
     NSLog(@"The user tapped the detail button %d", [indexpath row]);
 } 

to push a view controller you can just add

 [self.navigationController pushViewController:secondView animated:YES];
Adrian P
  • 6,479
  • 4
  • 38
  • 55
stabilocode
  • 168
  • 8
0

I received many good answers and suggestions for approaches. I've chosen to use the answer for this thread:

UITableView set to static cells. Is it possible to hide some of the cells programmatically?

Community
  • 1
  • 1
ullstrm
  • 9,812
  • 7
  • 52
  • 83