我的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