Hey people, I have some data and you want to show it in a new view inside the navigation stack.
I created a new viewcontroller class with an XIB file. Then I edited the XIB file and placed the following hierarchy:
1 files owner 2 first responder 3 scrollview 3.1 view 3.1.1 label1 3.1.2 label2 3.1.3 label3 3.1.4 image4
I laid out the tags and the image. Label content may vary and should be dynamically distributed. I also made IBOutlets in the viewcontroller class and connected everything correctly. The file owner view delegate is set to view.
then I load the viewcontroller and I do the following in the viewDidLoad method:
- (void)viewDidLoad { [super viewDidLoad]; self.currentPageURL.text = [self.offerItem objectForKey: @"page-url"]; self.currentPrice.text = [self.offerItem objectForKey: @"price"]; self.currentRank.text = [self.offerItem objectForKey: @"rank"]; self.currentName.text = [self.offerItem objectForKey: @"name"]; self.currentProducerName.text = [self.offerItem objectForKey: @"producer-name"]; self.currentDescription.text = [self.offerItem objectForKey: @"description"]; self.imageViewForImage.image = [helperClass resizeImage:[self.offerItem objectForKey: @"picture"] forSize:CGSizeMake(280.0, 280.0) ]; [theScrollview setScrollEnabled:YES]; [theScrollview setContentSize:CGSizeMake(320, 1200)]; [theScrollview flashScrollIndicators]; [theScrollview addSubview:theView];
}
when I run the application in my simulator everything is displayed, but if I try to scroll, nothing happens.
what am I doing wrong?
source share