Ich bin ein Anfänger i in diff Weise versuchte, nicht so für Anregungen in ihmWie URL über die Methode "segue" an die Webansicht übergeben wird?
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
// Return the number of sections.
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
// Return the number of rows in the section.
return self.objects.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *[email protected]"cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
cell.textLabel.text=self.objects[indexPath.row];
return cell;
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
ViewController *webview = [[ViewController alloc] init];
if ([[segue identifier] isEqualToString:@"showdetails"])
{ // Facebook
NSString *[email protected]"https://www.facebook.com/";
webview = [segue destinationViewController];
webview.urlstr = urlstr;
webview.title = @"Facebook"; // this sets the title of the next page
}
else if ([[segue identifier] isEqualToString:@"showdetails"]) { // Instagram
NSString *[email protected]"http://instagram.com/";
webview = [segue destinationViewController];
webview.urlstr = urlstr;
webview.title = @"Instagram"; // this sets the title of the next page
}
else if ([[segue identifier] isEqualToString:@"showdetails"]) { // Twitter
NSString *[email protected]"https://twitter.com/";
webview = [segue destinationViewController];
webview.urlstr = urlstr;
webview.title = @"Twitter"; // this sets the title of the next pag
}
else if ([[segue identifier] isEqualToString:@"showdetails"]) { // YouTube
NSString *[email protected]"http://www.youtube.com/";
webview = [segue destinationViewController];
webview.urlstr = urlstr;
webview.title = @"YouTube"; // this sets the title of the next page
}
self.title = @"Follow"; // This sets the title of the back button, and the title of this page
}
was yuour Frage ...? Was die Antwort erwarten Sie –
was genau wollen Sie? –
Identischer Identifikator für alle Segmente ??????? –