One-day project summary

Source: Internet
Author: User

One-day project summary
2015
7.1

One-day Project summary series
Analysis of all kinds of excellent projects and humble opinion. Some gibberish also invites the author to understand.

The structure is chaotic and the focus jumps higher. Currently only for personal summary use, not suitable for people can choose not to watch ^ ^

Tstylemenuview
Cocoachina recommended on the list of imitation American groups.
The horizontal Itembar is implemented by Lsselectmenuview, which inherits from UIView and implements two proxies lsselectmenuviewdatasource<nsobject> and Lsselectmenuviewdelegate<nsobject>.
Pass
[UIView animatewithduration:durationtime animations:^{
Sender.markImgView.transform = Cgaffinetransformrotate (Sender.markImgView.transform,-M_PI);
} completion:^ (BOOL OK) {
if (OK) {

self.userinteractionenabled = YES;
}
}];
To implement scaling animations for buttons and drop-down lists
The project uses a ShowView to do the background view of the pull-down window, doing addsubview and Removefromsuperview operations on the ShowView. And put a gesture on the ShowView to achieve the point of the operation of the collection.
Responsechain, when a tap event is received, first check to see if the event is responding, otherwise it will pass down. So, even addsubview on the ShowView, the clicks on the subview can be passed to ShowView.

The size of the ShowView is full screen, always covered. Just the background is done by the animation, is a shallow to the depth of the animation. It is not as abrupt as the upper and lower stretching.

When you switch between items, the ShowView does not change state, it is still a translucent color and fills the screen.
When you click on an item to open and contract, there will be a color gradient animation. So, paired with ShowView, there is also a accessibilityidentifier that indicates the color status of ShowView. The ShowView in the code has a height change. Yes, if you do not change the height, after closing, you can not click the view behind.

Closing of the drop-down view
[UIView animatewithduration:durationtime animations:^{
//
Vv.frame = CGRectMake (0, 0, vv.frame.size.width, 0);
}completion:^ (BOOL finished) {
//
[VV Removefromsuperview];
}];
Close background
[UIView animatewithduration:durationtime animations:^{
//
_showview.backgroundcolor = [Uicolor colorwithred:0.145 green:0.145 blue:0.145 alpha:0];

}completion:^ (BOOL finished) {
//
_showview.frame = Minshowrect;
_showview.accessibilityidentifier = @ "NO";
}];

Accessibilityidentifier
Uiaccessibilityidentification
The Uiaccessibilityidentification protocol is used to associate a unique identifier with elements in your user interface.
Uiaccessbilityelement *elelment = [[UIApplication sharedapplication] Accessbilityelementwithlabel:label];
UIView *view = (uiview*) [Uiaccessibilityelement viewcontainingaccessbilityelement:element];
Similar to the role of tag. Quickly find a view.

The disadvantage of this class is that
1. Pull-down page is not independent, merge in Lsselectmenuview
2. The click of the button is forbidden at the beginning of the processing of the Click event, and the animation is completed before it is opened. It may be to circumvent animation conflicts, but as a primary action focus, clicking on no effect has a significant impact on the user experience.

One-day project summary

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.