0
我有以下代碼在textview中顯示內部圖像。我試圖顯示外部http://鏈接到textview。如何顯示外部圖像到textview?
以下代碼工作正常。請幫助我顯示外部鏈接圖像。通過這一功能,提供URL
UITextField *txtstate =[[UITextField alloc]init]; [txtstate setFrame:CGRectMake(10, 30,170, 30)];
txtstate.delegate=self;
NSString * quotStr03 = [[NSString alloc] initWithFormat:@"%@",[dict valueForKey:@"deal-image"]];
txtstate.text=quotStr03;
txtstate.borderStyle = UITextBorderStyleLine;
txtstate.background = [UIImage imageNamed:quotStr03];
[txtstate setAutocorrectionType:UITextAutocorrectionTypeNo];
[self.view addSubview:txtstate];
的[在iOS的一個URL創建一個UIImage(可能的複製http://stackoverflow.com/questions/7694215/create-a-uiimage -with-a-url-in-ios) – rmaddy