Quote:
Originally Posted by smithdale87
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?