Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9268899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:58:28+00:00 2026-06-18T14:58:28+00:00

I’m trying to create a SplitViewController view but I get the following warning: Property

  • 0

I’m trying to create a SplitViewController view but I get the following warning:

Property splitViewController requires a method setSplitViewController to be defined -use @Synthesize,@dynamic or provide a method implementation in this class implement.

Here is the code

///AppDelegate.h

 @class ViewController;
 @class DetailViewController;

 @interface AppDelegate : UIResponder <UIApplicationDelegate, UISplitViewControllerDelegate>
{
UISplitViewController *splitViewController;
ViewController *viewcontroller;
DetailViewController *detailViewController;
}
@property (nonatomic,retain) UIWindow *window;
@property (nonatomic,retain) DetailViewController *detailViewController;
@property(nonatomic,retain)  UISplitViewController *splitViewController;
@property (nonatomic,retain) ViewController *viewController;

@end

///AppDelegate.m"

#import "ViewController.h"
#import "DetailViewController.h"

@implementation AppDelegate

@synthesize window = _window;
@synthesize viewController = _viewController;
 @synthesize splitviewController;
 @synthesize detailViewController;
- (void)dealloc
{
   [_window release];
   [_viewController release];
   [super dealloc];
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
   ViewController *rootViewController = [[ViewController alloc]   initWithStyle:UITableViewStylePlain];
   UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:rootViewController];
   detailViewController = [[DetailViewController alloc] initWithNibName:@"DetailView" bundle:nil];
   rootViewController.detailViewController = detailViewController;    

   splitViewController = [[UISplitViewController alloc] init];
   splitViewController.viewControllers = [NSArray arrayWithObjects:navigationController, detailViewController, nil];
   splitViewController.delegate = detailViewController;

   [self.window makeKeyAndVisible];
   return YES;
}




///ViewController.h
 #import <UIKit/UIKit.h>
 @class DetailViewController;
 @interface ViewController : UITableViewController{
 DetailViewController *detailViewController;
 NSMutableArray *phone;
 }
@property (nonatomic,retain)IBOutlet DetailViewController *detailViewController;
@property (nonatomic,retain) NSMutableArray *phone;
@end



///ViewController.m
#import "ViewController.h"
#import "DetailViewController.h"

@interface ViewController ()

@end

 @implementation ViewController
 @synthesize detailViewController,phone;

  - (CGSize)contentSizeForViewInPopoverView {
 return CGSizeMake(320, 600);
 }


- (void)viewDidLoad
{
  [super viewDidLoad];
  self.phone = [[NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"phone" ofType:@"plist"]] retain];

// Do any additional setup after loading the view, typically from a nib.
  }

  - (void)viewDidUnload
{
 [super viewDidUnload];
// Release any retained subviews of the main view.
 }

 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
 {
 return YES;
 }
- (NSInteger)numberOfSectionsInTableView:(UITableView *)aTableView {
  // Return the number of sections.
 return 1;
 }


 - (NSInteger)tableView:(UITableView *)aTableView numberOfRowsInSection:(NSInteger)section {
// Return the number of rows in the section.
return [phone count];
 }


  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

  static NSString *CellIdentifier = @"CellIdentifier";

// Dequeue or create a cell of the appropriate type.
 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
 if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    cell.accessoryType = UITableViewCellAccessoryNone;
 }

// Configure the cell.
 cell.textLabel.text = [self.phone objectAtIndex:indexPath.row];
 return cell;
 }
  - (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

  /*
   When a row is selected, set the detail view controller's detail item to the item associated with the selected row.
   */
 detailViewController.detailItem = [self.phone objectAtIndex:indexPath.row];
 }
 - (void)dealloc {
 [detailViewController release];
 [super dealloc];
 }



  @end
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T14:58:29+00:00Added an answer on June 18, 2026 at 2:58 pm

    In ur code, you haven’t synthesized your splitViewController property. Since You have not synthesized it the property, the compiler is issuing a warning asking u to either synthesize the property so that it can generate setters and getters automatically for your convinienvce (You can use the generated setters and getters using . notation as in self.splitViewController so synthesize it as
    @synthesize splitViewController = _splitViewController

    or

    implement your own custom setter and getter as

    //setter
    - (void)setSplitViewController:(UISplitViewController*)splitViewController_ {
        //assuming your property has retain identifier
        if (splitViewController != splitViewController_) {
            [splitViewController release];
            splitViewController = [splitViewController_ retain];
        }
    }
    
    //getter
    - (UISplitViewController*)splitViewController {
        return splitViewController;
    }
    

    or

    declaring the property as dynamic using @dynamic splitViewController . This means that the setter and getter for the property will be provided from somewhere else.

    EDIT:

    replacedidFinishLaunchingWithOptions method in appDelegate.m with the following:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
       _viewController = [[ViewController alloc] initWithNibName:@"ViewController's nib name" bundle:nil];
       UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:_viewController];
       detailViewController = [[DetailViewController alloc] initWithNibName:@"DetailView" bundle:nil];
       rootViewController.detailViewController = detailViewController;    
    
       splitViewController = [[UISplitViewController alloc] init];
       splitViewController.viewControllers = [NSArray arrayWithObjects:navigationController, detailViewController, nil];
       splitViewController.delegate = detailViewController;
    
       self.window.rootViewController = splitViewController;
       return YES;
    }
    

    also edit the dealloc:

    - (void)dealloc
    {
       [_window release];
       [_viewController release];
       [splitViewController release];
       [detailViewController release];
       [super dealloc];
    }
    

    And in viewController viewDidLoad replace self.phones line with this

    self.phone = [[NSArray arrayWithObjects:@”Cell ONE”,@”Cell TWO”,@”Cell THREE”,@”Cell FOUR”,@”Cell FIVE”,@”Cell SIX”, nil];

    this is just for testing that the array part is loading properly..so that you can see the cells if they are getting created. put a break point in cellForRowAtIndexPath method and see if its getting called

    and then finally in didSelect see if the detailItem iVar is not nil.

    And Yes, check the NIB names properly before loading them, and also that all outlets in the NIB are properly connected.

    Cheers and Have fun.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to create an if statement in PHP that prevents a single post
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am confused How to use looping for Json response Array in another Array.
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.