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 05-27-2011, 03:25 PM   #1 (permalink)
Registered Member
 
Join Date: Apr 2011
Posts: 58
Terry2124 is on a distinguished road
Default Desperate Extremely Desperate

I have read tons and tons of tutorials, yet I cannot find a way to create custom uitableviewcells.


This has been holding me up for a couple of weeks. I'm tired of sitting on my but and reading tutorials only to find a dead end and it not work. I am so close but something is missing.

1. I start with a window based app
2. Add navigationcontroller delegate
3. uinavigationcontroller *navController, iboutlet, synthesize............
4. In IB, drag a navigation controller, connect app delegate and connections.

IT works fine, build and run I can see the controller on top.


Now.....I want to create custom cells. What is the best way to do so? I have tried so many ways.


If you live in CA or US I could even call if you PM me.


Thank you kindly.
Terry2124 is offline   Reply With Quote
Old 05-27-2011, 03:30 PM   #2 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,983
smithdale87 is on a distinguished road
Send a message via AIM to smithdale87
Default

Can you describe how you have already attempted and failed at custom cells? I recall when I needed custom cells before, the tutorials I found on Google were excellent.
smithdale87 is offline   Reply With Quote
Old 05-27-2011, 07:28 PM   #3 (permalink)
Registered Member
 
Join Date: Apr 2011
Posts: 58
Terry2124 is on a distinguished road
Default

Quote:
Originally Posted by smithdale87 View Post
Can you describe how you have already attempted and failed at custom cells? I recall when I needed custom cells before, the tutorials I found on Google were excellent.

Created new project - CustomCellProject (Window Based Application)

I add the following code in the .h
Code:
#import <UIKit/UIKit.h>

@interface CustomCellProjectAppDelegate : NSObject <UIApplicationDelegate,UINavigationControllerDelegate> {
    UIWindow *window;
	UINavigationController *navigationController;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;

@end
I then add 2 lines of code in the .m
Code:
#import "CustomCellProjectAppDelegate.h"

@implementation CustomCellProjectAppDelegate

@synthesize window;
@synthesize navigationController;


#pragma mark -
#pragma mark Application lifecycle

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    
    // Override point for customization after application launch.
    
    [self.window addSubview:navigationController.view];
	[self.window makeKeyAndVisible];
Then dealloc.

Now i go into IB and drag over a Navigation Controller. I then control drag from navigation controller to the CustomCellProjectAppDelegate and select the outlet of navigationController.

As seen in the attached screenshot.

Build and run, I have the navigation controller bar up top and a white window. All good so far.


Now this part is where I get confused, tried many things. I know I have to create a subclass of uitableview. I know when i create the customcell.xib to delete the view and drag over a uitableviewcell.

The files owner becomes something not sure too confused?

How can I go from creating the CustomCell.xib to linking it up to my navigation controller?
Attached Images
File Type: jpg Screen shot 2011-05-27 at 8.23.05 PM.jpg (21.3 KB, 0 views)
Terry2124 is offline   Reply With Quote
Old 05-27-2011, 07:54 PM   #4 (permalink)
Super Moderator
 
Join Date: Oct 2009
Location: San Diego, CA
Posts: 1,586
JasonR is on a distinguished road
Default

I would recommend you read Brian Slick's guide to working with UITableViews. Since he's top Poster, you can click on his name to the right, and you'll see a link to his guide. It should cover everything you need.
__________________
My development blog: http://jrinn.com
JasonR is offline   Reply With Quote
Old 05-27-2011, 11:13 PM   #5 (permalink)
Registered Member
 
Join Date: Apr 2011
Posts: 58
Terry2124 is on a distinguished road
Default

Quote:
Originally Posted by JasonR View Post
I would recommend you read Brian Slick's guide to working with UITableViews. Since he's top Poster, you can click on his name to the right, and you'll see a link to his guide. It should cover everything you need.
Another example of where I hit a dead end.

Section 5 create 10 rows.
Clinging To Ideas: UITableView How-To: Part 4 - XIB-Based Cells

Doesn't say what to do.



If I use a drill down tableview will the custom cells work?
Terry2124 is offline   Reply With Quote
Old 05-28-2011, 03:45 AM   #6 (permalink)
Registered Member
 
Join Date: Sep 2009
Location: Doncaster UK
Posts: 120
acegames is on a distinguished road
Default

Have you checked the apple example ?

Loading…
acegames is offline   Reply With Quote
Old 05-28-2011, 04:08 AM   #7 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Jan 2010
Location: Issaquah, WA
Age: 42
Posts: 1,244
dljeffery is on a distinguished road
Default

So far, you haven't really described any bit of how you are trying to create and use custom cells. You've only described other parts (mostly boilerplate parts) of your code and efforts.
__________________
Recall It! Tag your notes. Tag your photos. Tag your thoughts. Tag your life.

Recall It! for iPad

http://www.dljeffery.com
dljeffery 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: 344
6 members and 338 guests
doffing81, dre, iOS.Lover, jenniead38, Kirkout, Wikiboo
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,120
Posts: 402,898
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 02:13 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0