i want to update my app to make compatible of iOS9.UIPasteboard's methods ware working perfectly till iOS8 but when i run in iOS9 there is no response from UIPasteboard. i mean to say, i'm not getting string or url or images. i read Apple'S Developer Document but can't find something useful.to get string from UIPasteboard i use following method..
id data;
data = [UIPasteboard generalPasteboard].image;
if(!data){
data = [UIPasteboard generalPasteboard].string;
if(!data){
data = [UIPasteboard generalPasteboard].URL;
if(!data){
}else{
NSLog(@"\nLast Copied URL:[%@]",data);
}
}else{
NSLog(@"\nLast Copied Text:[%@]",data);
}
}else{
NSLog(@"\nImage Copied");
}
any Guidance will be appreciated.
EDIT:
see screenshot when i copy text from browser
来源:https://stackoverflow.com/questions/33075125/uipasteboard-doesnt-work-in-ios9-xcode7-0