No visible @interface for 'UITextView'


#1

The code directly below is telling me there’s No visible @ interface for ‘UITableView’. The bottom two lines with ‘setBorderStyle’ and ‘setPlaceholder’ is where it’s specifically happening. I can’t figure this out because I copied my code from when I first did this excercise in a different xCode file that would run, it still wont let me run this. Any help would be awesome!

// Create and configure the text field where new tasks will be typed
taskField = [[UITextField alloc] initWithFrame:fieldFrame];
[taskField setBorderStyle:UITextBorderStyleRoundedRect];
[taskField setPlaceholder:@“Type a task, tap Insert”];

[code]
#import “BNRAppDelegate.h”

// Helper fuction to fetch he path to our to-do data stored on disk
NSString *docPath()
{
NSArray *pathList = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
return [[pathList objectAtIndex:0] stringByAppendingPathComponent:@“data.td”];
}

@implementation BNRAppDelegate

#pragma mark - Application delegate callbacks

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
    // Attempt to load an existing to-do dataset from an array stored to disk.
    NSArray *plist = [NSArray arrayWithContentsOfFile:docPath()];
    if (plist) {

      // If there was a dataset available, copy it into our instance variable.
      tasks = [plist mutableCopy];
    

    } else {

      // Otherwise, just create an empty one to get us started
      tasks = [[NSMutableArray alloc] init];
    

    }

    // Create and configure the UI window instance
    //A CGRect is a struct with an origin (x,y) and size (width, height)
    CGRect windowFrame = [[UIScreen mainScreen] bounds];
    UIWindow *theWindow = [[UIWindow alloc] initWithFrame:windowFrame];
    [self setWindow:theWindow];

    // Define the frame rectangles of the three UI elements
    // CGRectMake() creates a CGRect from (x, y, width, height)
    CGRect tableFrame = CGRectMake(0, 80, 320, 380);
    CGRect fieldFrame = CGRectMake(20, 40, 200, 31);
    CGRect buttonFrame = CGRectMake(228, 40, 72, 31);

    // Create and configure the table view
    taskTable = [[UITableView alloc] initWithFrame:tableFrame
    style:UITableViewStylePlain];
    [taskTable setSeparatorStyle:UITableViewCellSeparatorStyleNone];

    // Create and configure the text field where new tasks will be typed
    taskField = [[UITextField alloc] initWithFrame:fieldFrame];
    [taskField setBorderStyle:UITextBorderStyleRoundedRect];
    [taskField setPlaceholder:@“Type a task, tap Insert”];

    // Create and configure a rounded rect insert button
    insertButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    [insertButton setFrame:buttonFrame];

    // Buttons behave using a target/action callback
    // Configure the Insert button’s action to call this objects -addTask: method
    [insertButton addTarget:self
    action:@selector(addTask:)
    forControlEvents:UIControlEventTouchUpInside];

    // Give the button a title
    [insertButton setTitle:@"Insert"
    forState:UIControlStateNormal];

    // Add our three UI elements to the window
    [[self window] addSubview:taskTable];
    [[self window] addSubview:taskField];
    [[self window] addSubview:insertButton];

    // Finalize the window and put it on the screen
    [[self window] setBackgroundColor:[UIColor whiteColor]];
    [[self window] makeKeyAndVisible];

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];

    return YES;
    } [/code]