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-23-2011, 12:36 AM   #1 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 98
SteveMobs is on a distinguished road
Question Problems re-assigning a tableFooterView

I have a tablew view in which I would like to have two different tableFooterViews, depending on the edit-mode.

In the contructor I create and assign the following views:

Code:
self.tableFooterView = ...
self.tableFooterViewEdit = ...
In the setEditing-method I wanted to toggle the tableFooterView of the table view:

Code:
- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
	[super setEditing:editing animated:animated];
    
    if (self.editing) {
        self.tableView.tableFooterView = self.tableFooterViewEdit;
    } else {
        self.tableView.tableFooterView = self.tableFooterView;
    }
    
    ...
}
Now, when testing this in the simulator the app crashes when going into the edit-mode (EXC_BAD_ACCESS). I checked the two views, both work fine when not toggling.

Even if one of the both views is nil, it does not work. For me, it seems like the tableFooterView cannot be re-assigned (not even to nil)!? What am I missing?

Thanks
SteveMobs is offline   Reply With Quote
Old 09-23-2011, 08:10 AM   #2 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 98
SteveMobs is on a distinguished road
Thumbs up

Ooops, sorry my fault. The two views were defined as assign-properties. That caused the EXC_BAD_ACCESS error. Now, with having changed them to retain-properties everything works fine.
SteveMobs is offline   Reply With Quote
Reply

Bookmarks

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: 389
14 members and 375 guests
7twenty7, eski, EvilElf, glenn_sayers, HemiMG, iOS.Lover, jarv, n00b, pbart, Pudding, sacha1996, Sami Gh, UMAD, VinceYuan
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:16 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0