Demand analysis and knowledge point of crazy guess graph, Requirement Analysis knowledge point

Source: Internet
Author: User

Demand analysis and knowledge point of crazy guess graph, Requirement Analysis knowledge point
Requirement Analysis 1> interface variable element 1. There is an index, image, and description, and the next item is automatically jumped to the next item as the next button is clicked. 2. Click the zoom in button or the image to enlarge the image. After the image is enlarged, a translucent mask is displayed after the enlarged image. The mask covers all the elements behind it. Click masks and images to restore the images and masks. 3. Each time you click the next question button, the number of answer boxes below will change and the candidate answer text will change. 4. Click the candidate answer button below. The button is invisible and the text is displayed on the answer button above. 5. Click the answer button, text hour, and the corresponding alternative answer button below is displayed. 6. automatically determine whether the answer is filled up. Check whether the answer is correct after it is filled up. The blue color is displayed correctly, and the next question is automatically displayed, with extra points. The blue color is displayed for errors. When the answer is not enough, it turns back to black. 7. Click the prompt button and click the first text of the correct answer. The score is deducted. 2> new knowledge point 1. encoding of KVC key-value pairs

1-(instancetype) initWithDict :( NSDictionary *) Dict {2 // ** assign a value to the model */3 if (self = [super init]) {4 [self setValuesForKeysWithDictionary: dict]; 5} 6 return self; 7}

 

Specifically, setValuesForKeysWithDictionary: The method can assign values to the self member variables corresponding to the dictionary in batches. There are several key-value pairs in the dictionary, and several member variables with the same key can exist, it is required that the dictionary key value name must be the same as the model member name to be automatically copied. Not all key-value pairs in the dictionary are displayed. KVC can also find the path 1 NSArray * array = [persons valueForKeyPath: @ "name"] When KVC takes the PATH value, if the object does not contain the specified object, it will automatically enter the object, search for object attributes. 2. Lazy loading of fixed formats # pragma mark lazy loading
1-(NSArray *) questions 2 {3 if (_ questions = nil) {4 // 1. load plist 5 NSArray * tempArray = [NSArray arrayWithContentsOfFile: [[NSBundle mainBundle] pathForResource: @ "questions" ofType: @ "plist"]; 6 7 // 2. create model array 8 NSMutableArray * arrayM = [NSMutableArray array]; 9 for (NSDictionary * dict in tempArray) {10 [arrayM addObject: [HZHquestions questionWithDict: dict]; 11} 12 _ questions = arrayM; 13} 14 return _ questions; 15}

 

First, it is null. Then, it loads the plist file, creates a model Array Using the for loop, and saves the model array to the member variable array. 3. Set the status bar display
1 // set the status bar to highlight 2-(UIStatusBarStyle) preferredStatusBarStyle {3 return blank; 4} 5 // set the regular display 6-(UIStatusBarStyle) preferredStatusBarStyle {7 return UIStatusBarStyleDefault; 8} 9 // set the status bar visibility 10-(BOOL) prefersStatusBarHidden {11 12 return YES; 13}

 

UIStatusBarStyle is the status bar, And UIStatusBarStyleLightContent and UIStatusBarStyleDefault are the status bar.

 

4. To determine whether two strings are equal, do not use "=". Use istoo tostring: [options istoo tostring: question. answer] to determine whether the two strings are equal. 5. Override the description method to track object data. 6. move the object to the beginning of [self. view bringSubviewToFront: self. pictureView] 7. remove all child controls [self. answerView. subviews makeObjectsPerformSelector: @ selector (removeFromSuperview)]; 8. set the control to a hidden state option. hidden = YES; 9. retrieve the title NSString * temp = [btn titleForState: UIControlStateNormal] of the control.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.