“外观清晰”不起作用

时间:2013-08-27 23:03:47

标签: uitableview xcode4.6

在XCode 4.6.3中,“Clear on Appearance”复选框不适用于行选择。 enter image description here

所有视图控制器都忽略此复选框。有谁知道为什么以及是否有解决方法?

以下是其中一个存在问题的视图控制器的代码。

@implementation PointsOfInterestViewController
@synthesize poi, urlTranslator;

- (void)viewDidLoad
{
    [super viewDidLoad];

    poi = [NSArray arrayWithObjects:
       @"Beaches",
       @"Churches",
       @"Coffee Shops",
       @"Discount/Low Cost Stores",
       @"Grocery Stores",
       @"Hotels",
       @"Libraries",
       @"Movie Theaters",
       @"Museums",
       @"Parks",
       nil];

urlTranslator = [NSDictionary dictionaryWithObjectsAndKeys:
                 @"beaches", @"Beaches",
                 @"http://m.westmont.edu/poi_churches_nonav.html", @"Churches",
                 @"coffeeshops", @"Coffee Shops",
                 @"discount", @"Discount/Low Cost Stores",
                 @"grocery", @"Grocery Stores",
                 @"http://m.westmont.edu/poi_hotels_nonav.html",@"Hotels",
                 @"locallibraries", @"Libraries",
                 @"movietheaters", @"Movie Theaters",
                 @"museums", @"Museums",
                 @"parks", @"Parks",
                 nil];
}

- (void)viewDidUnload
{
    [super viewDidUnload];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:     (UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
    {
    return poi.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    cell.textLabel.text = [poi objectAtIndex:indexPath.row];
    return cell;
}

#pragma mark - Table view delegate

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    UITableViewCell *cell = (UITableViewCell *)sender;
    NSIndexPath *indexPath = [self.tableView indexPathForCell:cell];
    NSString *pointofinterest = [self.poi objectAtIndex:indexPath.row];

    if ([segue.identifier isEqualToString:@"showPOI"]) {
    EmergencyWebViewController *ewvc = [segue destinationViewController];
    ewvc.navigationItem.title = pointofinterest;
    ewvc.myURL = [self.urlTranslator objectForKey:pointofinterest];
    }
}

0 个答案:

没有答案