Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 03-28-2011, 11:04 AM   #1 (permalink)
Registered Member
 
sacha1996's Avatar
 
Join Date: Mar 2011
Posts: 415
sacha1996 is on a distinguished road
Default UITableView accessoryView

Hi ,
I'm using an custom accessoryView with my image called "Image.png".
I have 102 cells.
What I want to know is how to make the first 101 cells with the accessoryView visible , and for the 102th cell to make the accessoryView hidden.
So the first 101 cells with accessoryView
and the last or 102th cell without accessoryView
Any idea maybe ?

Thankyou
sacha1996 is offline   Reply With Quote
Old 03-28-2011, 11:49 AM   #2 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

Code:
if ([indexPath row] == whateverYouWant)
{
   // Don't show the accessoryView
}
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Old 03-28-2011, 12:14 PM   #3 (permalink)
Registered Member
 
sacha1996's Avatar
 
Join Date: Mar 2011
Posts: 415
sacha1996 is on a distinguished road
Default

Quote:
Originally Posted by BrianSlick View Post
Code:
if ([indexPath row] == whateverYouWant)
{
   // Don't show the accessoryView
}
I've tried this code and it doesn't work (in the ViewDidLoad) :
Code:
	if ([indexPath row] == 102){
		cell.accessoryView.hidden = YES;
	}
Do you know why ?
sacha1996 is offline   Reply With Quote
Old 03-28-2011, 12:15 PM   #4 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

Do you know how to put stuff in a table cell?
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Old 03-28-2011, 12:19 PM   #5 (permalink)
Registered Member
 
sacha1996's Avatar
 
Join Date: Mar 2011
Posts: 415
sacha1996 is on a distinguished road
Default

Quote:
Originally Posted by BrianSlick View Post
Do you know how to put stuff in a table cell?
Yes , sure I know.
But actually the code worked.
I tried and tried and it worked.
Thanks man !
sacha1996 is offline   Reply With Quote
Old 03-28-2011, 12:21 PM   #6 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

Not from viewDidLoad, it didn't.
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Old 03-28-2011, 01:27 PM   #7 (permalink)
Registered Member
 
sacha1996's Avatar
 
Join Date: Mar 2011
Posts: 415
sacha1996 is on a distinguished road
Default

By me I implemented it in the ViewDidLoad because all my others things or also there inside. And it worked !
So I really thank you
sacha1996 is offline   Reply With Quote
Old 03-28-2011, 01:41 PM   #8 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,990
BrianSlick has a spectacular aura about
Default

It can't work from viewDidLoad. You have misunderstood something.
__________________
BriTer Ideas LLC - Professional iOS App Development. Available for hire.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
Definitive Guide To Properties | UITableView Series | Guide To Troubleshooting | Model Object Overview

Do you sit at a desk all day? Walk instead! Follow along with my treadmill desk adventures.
BrianSlick is offline   Reply With Quote
Old 03-28-2011, 01:46 PM   #9 (permalink)
Registered Member
 
sacha1996's Avatar
 
Join Date: Mar 2011
Posts: 415
sacha1996 is on a distinguished road
Default

I've checked again and you were right.
I thought i've seen ViewDidLoad.
I'm sorry for that , I hope you accept my excuses.
But thanks again for the code

Enjoy !

Last edited by sacha1996; 03-28-2011 at 01:52 PM.
sacha1996 is offline   Reply With Quote
Reply

Bookmarks

Tags
accessoryview, custom, image, uitableview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 371
12 members and 359 guests
condor304, dansparrow, dre, dreamdash3, ilmman, LezB44, michelle, Objective Zero, Sami Gh, shagor012, thephotographer, tinamm64
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,119
Posts: 402,896
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:36 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0