Commit af17db0e authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

open network stream VC: simplify pasteboard loader

parent 49c36027
......@@ -89,16 +89,9 @@
- (void)updatePasteboardTextInURLField
{
if ([[UIPasteboard generalPasteboard] containsPasteboardTypes:@[@"public.url", @"public.text"]]) {
NSURL *pasteURL = [[UIPasteboard generalPasteboard] valueForPasteboardType:@"public.url"];
if (!pasteURL || [[pasteURL absoluteString] isEqualToString:@""]) {
NSString *pasteString = [[UIPasteboard generalPasteboard] valueForPasteboardType:@"public.text"];
pasteURL = [NSURL URLWithString:pasteString];
}
if (pasteURL && ![[pasteURL scheme] isEqualToString:@""] && ![[pasteURL absoluteString] isEqualToString:@""])
self.urlField.text = [pasteURL absoluteString];
}
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
if ([pasteboard containsPasteboardTypes:@[@"public.url"]])
self.urlField.text = [[pasteboard valueForPasteboardType:@"public.url"] absoluteString];
}
- (void)viewWillAppear:(BOOL)animated
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment