私のView Controllerには、以下のUIImageViewとUITextViewが含まれています。これは私のコードです:
#import <UIKit/UIKit.h>
@interface DescriptionViewController : UIViewController
@property (nonatomic, strong) IBOutlet UIImageView *descriptionImage;
@property (nonatomic, strong) IBOutlet UITextView *descriptionText;
@property (nonatomic, strong) NSString *text;
@property (nonatomic, strong) NSString *image;
@end
@interface DescriptionViewController ()
@end
@implementation DescriptionViewController
- (void)viewDidLoad
{
[super viewDidLoad];
self.descriptionText = [[UITextView alloc] init];
self.descriptionImage.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:self.image]]];
self.descriptionText.text = self.text;
NSLog(@"%@", self.descriptionText.text);
}
@end
私のコードはテキストビューに表示されませんが、NSLog を使用して印刷できます。
何が問題なのですか?