我的iOS应用程序出现问题。这是一个简单的iOS网页浏览器。iOS:我的tableView不显示
我的tableView在Xcode xib中可见,但在运行模拟器时未显示。我已经实现UITableViewDataSource
,UITableViewDelegate
协议和下面的方法:
-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView
-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
-(UITableViewCell *) tableView:(UITableView *) tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
这里是我的AppDelegate.h class
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
这里是我AppDelegate.m类
这里是我的History&Favorites.h class
#import <UIKit/UIKit.h>
@interface History_Favorites : UIViewController <UITableViewDataSource, UITableViewDelegate>
@property (retain, nonatomic) IBOutlet UITableView *tableWithBookmarks;
@property (retain,nonatomic) NSMutableArray *URLs;
@end
这里是我的History&Favorites.m类
我将不胜感激任何意见。提前致谢。
这是当我运行的应用程序,没有显示与我的tableView厦门国际银行文件。 http://i.stack.imgur.com/XAR6m.png – Diana 2014-10-08 11:07:27
[self.URLs count]在numberOfRowsInSection中返回的值是否与0不同? – Rafouille 2014-10-08 11:14:25
你可以显示代码如何实现'cellForRowAtIndexPath:' – nburk 2014-10-08 11:17:31