iphone - UIPageControl is not Displayed -


मैं scrollview और pagecontrol को प्रदर्शित करने के लिए निम्न का उपयोग करता हूं

  scrollView = [[UIScrollView alloc] InitWithFrame: CGRectMake (0, 0, 320, 17 9)]; PageControl = [[UIPageControl alloc] initWithFrame: CGRectMake (0, 17 9, 320, 20)]; ScrollView.delegate = self; [ScrollView setBackgroundColor: [UIColor blackColor]]; [स्क्रॉल करेंउप सेट करेंकैंकेलेंटटॉचः नहीं]; ScrollView.indicatorStyle = UIScrollViewIndicatorStyleWhite; ScrollView.clipsToBounds = हाँ; ScrollView.scrollEnabled = हाँ; ScrollView.pagingEnabled = हाँ; इंट इंडेक्स = [[स्वयं। _परमेटर्स ऑब्जेक्ट फोरेकी: @ "इंडेक्स"] इंटवल्यू]; NSString * imageNamePrefix = [[[activeAppIdList ऑब्जेक्टऑटइंडएक्स: इंडेक्स] ऑब्जेक्टफ़ोरेकी: @ "ऐपआईडी"]; Int noOfScreenShot = [[[activeAppIdList ऑब्जेक्टअटइंडएक्स: इंडेक्स] ऑब्जेक्टफ़ोरेकी: @ "नो ओफ़स्क्रीनशॉट"] इंटवेले]; CGFloat सीएक्स = 0; के लिए (इंट जे = 1; जे एंड एलटी; = नो ओफ़स्क्रीनशॉट; जे ++) {UIImage * image = [[UIImage alloc] init]; छवि = [स्व लोड इमेज: [[एनएसएसटीिंग एलोक] इनट विथ फ़ॉर्मेट: @ "% @ _% d.jpg", छविनामपैफ़िक्स, जे]]; यदि (छवि == शून्य) {NSString * urlString = [[NSString alloc] initWithFormat: @ "http: //localhost/MoreApp/images/%@_%d.jpg", छविनामप्रफ़िक्स, जे]; एनएसडीटा * छविडेटा = [एनएसडीटा डेटाविथ कंटेंटऑफURL: [एनएसड URL यूआरएल स्ट्रथिंग: यूआरएलस्ट्रिंग]]; UIImage * temp = [[UIImage alloc] initWithData: imageData]; [स्वयं बचाइयेः Temp withName: [[NSString alloc] initWithFormat: @ "% @ _% d.jpg", छविनामप्रफ़िक्स, जे]]; छवि = अस्थायी; [अस्थायी रिलीज]; [UrlString रिलीज़]; } UIImageView * imageView = [[UIImageView alloc] initWithImage: छवि]; [छवि रिलीज़]; ImageView.frame = CGRectMake (सीएक्स, 0, scrollView.frame.size.width, scrollView.frame.size.height); [ScrollView जोड़ें Subview: imageView]; [छवि देखें रिलीज़]; Cx + = scrollView.frame.size.width; } एनएसएलॉग (@ "पृष्ठों का नहीं।% D", नो ओफ़स्क्रीनशॉट); पृष्ठ नियंत्रक। NumberOfPages = noOfScreenShot; PageControl.currentPage = 0; ScrollView.contentSize = CGSizeMake (cx, scrollView.frame.size.height); NSLog (@ "चौड़ाई:% च", scrollView.frame.size.width); [RefToSelf.instructionView addSubview: scrollView]; [RefToSelf.instructionView addSubview: pageControl]; [स्क्रॉल देखें रिलीज़]; [पेजकंट्रोल रिलीज];  

स्क्रॉलव्यू ठीक है, लेकिन पेजकंट्रोल नहीं दिखाया ... मदद कर सकता है ??

यदि पृष्ठ नियंत्रण और कंटेनर का पृष्ठभूमि रंग समान है (डिफ़ॉल्ट रूप से सफेद) पृष्ठ नियंत्रण दिखाई नहीं देगा।


Comments