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 09-21-2011, 06:26 AM   #1 (permalink)
Registered Member
 
Join Date: Jul 2011
Posts: 32
mr curious is on a distinguished road
Default TableView reload Data crash

Hey all,

I've got a tabBar app with 2 tabs.
The first tab implements a UINavcontroller with a UIVieController that implements a table view. clicking on a table cell take you too another tableview with more populated cells etc. The last tableView is just a custom tableview cell. My problem arises is if I am currently on the last table view with ths custom cells and I switch to the second tab and then come back to the first tab again, the app crashes.

The crash occurs in the vieWillAppear function with
Code:
[self.tableView reload data];
why is this happening and do I need this reload data method there?

Thanks mc

Last edited by mr curious; 09-21-2011 at 06:34 AM.
mr curious is offline   Reply With Quote
Old 09-21-2011, 09:46 AM   #2 (permalink)
Registered Member
 
Join Date: Nov 2008
Posts: 864
nobre84 is on a distinguished road
Default

You need to post the full error message so we can have a clue of what's happening. If you have ever populated that tableview with data, calling reloadData will be harmless, just refreshing the table view. Maybe you load the data from an Array or other source, that you are not retaining properly - thus working at first but crashing when you reload the table.
nobre84 is offline   Reply With Quote
Old 09-21-2011, 10:14 AM   #3 (permalink)
Registered Member
 
Join Date: Jul 2011
Posts: 32
mr curious is on a distinguished road
Default

Thanks,
that makes sense.
Its a EXC Bad Access error on the reload data call
mr curious is offline   Reply With Quote
Old 09-21-2011, 10:16 AM   #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

You do know that it is "reloadData", right?
__________________
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 09-21-2011, 02:12 PM   #5 (permalink)
Registered Member
 
Join Date: Jul 2011
Posts: 32
mr curious is on a distinguished road
Default

Quote:
Originally Posted by BrianSlick View Post
You do know that it is "reloadData", right?
yes I have
Code:
[self.tableView reloadData];
spelling error. Sorry

mc
mr curious is offline   Reply With Quote
Old 09-21-2011, 02:33 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

Well, we can't solve it with only what you have shown. If it is an issue with coming back from the 2nd view controller, then the problem might be in that one.
__________________
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
Reply

Bookmarks

Tags
reload data, table cell, tableview, viewwillappear

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: 395
14 members and 381 guests
7twenty7, eski, EvilElf, HemiMG, iOS.Lover, jarv, n00b, pbart, Pudding, sacha1996, Sami Gh, UMAD, VinceYuan, yuncarl28
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,672
Threads: 94,121
Posts: 402,905
Top Poster: BrianSlick (7,990)
Welcome to our newest member, yuncarl28
Powered by vBadvanced CMPS v3.1.0

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