0

Parse.comのPFQueryTableViewを使用しています。

didselect行を使用してプログラムでPFObject(url)をUIWebviewに送信する方法はありますか?

ありがとう。

4

1 に答える 1

0

興味のある方は、SVWebViewControllerをダウンロードして実装できます。

そして、次のコードを使用します。

私の.Hファイルには次のものがあります。

...
@interface HomeworkSiteViewController : UITableViewController <UITableViewDelegate>
{

    NSArray *sectionsArray;
}

@property (strong, nonatomic) NSArray *sectionsArray;
@end

私の.mファイルには次のものがあります。

@implementation HomeworkSiteViewController
@synthesize sectionsArray;

- (void)viewDidLoad
{

... //バックグラウンドでの解析からオブジェクトを取得し、NSArrayに保存します。(私はArrayDataDesriptionに私のものを保存しました)

//次に、parse(ArrayDataDesription)から取得した配列をsectionsArrayに格納して、次を使用してdidSelectRowでアクセスできるようにします。

self.sectionsArray = ArrayDataDesription;

次に、didSelectRowでSVModalWebViewControllerを開始します。

「initWithAddress:」の場合は、配列からURLにアクセスします。

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    SVModalWebViewController *webViewController = [[SVModalWebViewController alloc] initWithAddress:[[sectionsArray objectAtIndex:indexPath.row] valueForKey:@"href"]];
    [self presentModalViewController:webViewController animated:YES];

}

ところで、私はアプリ開発の初心者です。すっごく...これはこれを行うための最良の方法ではないかもしれません。しかし、それは私のために働いた。

于 2012-11-04T03:32:07.847 に答える