Adaptive Copy Prompt box, no data picture loading <ios widgets >

Source: Internet
Author: User

Thank you very much, help my friends, thank you.

The component is written for less than 4 hours, including testing and modifying bugs. Named him Adaptivepromptdialogbox (is the Adaptive text prompt box);

Dull Hair Address: https://github.com/NIUXINGJIAN/AdaptivePromptDialogBox.git

"Authoring Background": Today the server returned the prompt copy is too long, originally from the definition of the implementation of the black box effect can not be satisfied. I'll find a way to make him adapt to width and height. In order to do a lot of pictures of the page loading, I encapsulated a method, used very well, decided to set it as a step in the method, do what it says, and soon realized.

"description": Labeling A, B, c three parts should usually be the same, you may feel abrupt, is not mistaken, no I am too lazy to standardize the folder name, forgive me, I have a package to share the words, may still be such. That's not the point.

Some of the APIs show:
#pragmaMark ———————— page Text tip effect/*hint text (str) to Parent view (view)??*/+ (void) Autoshowattentionwith: (NSString *) str andwith: (UIView *) view;/*hint text (str) to Parent view (view) Settings Prompt box (upper, middle, lower def = 1.0f Middle <-0.80f~0.80f>)??*/+ (void) Autoshowattentionwith: (NSString *) str andwith: (UIView *) View Hscale: (cgfloat) scale;#pragmaMark ———————— page Show effects < usage scenarios: Add no data pictures >/*Add no data graph (default diagram) to Parent view (S_view) settings under the text (str)??*/+ (void) Ndv_with: (NSString *) str andwith: (__weak UIView *) S_view;/*Add no data graph (custom diagram) to the parent view (S_view) settings below the text (str)??*/+ (void) Ndv_with: (NSString *) str img: (nsstring*) imgname andwith: (__weak UIView *) S_view;/*remove picture, text from parent view??*/+ (void) Ndv_remove;
How do I use it?

You only need to download the Autoattentionview, you can understand it simply by looking at it (bring it to your project), and then introduce Masry. Masonry is the dependency of this component, you do not want to use masory simple modification autoattentionview.m file implementation can be.
In addition, I also like to use masory programming, here you need to use this library, recommend the use of cocoapods, my dull hair more lazy, forgive me ah.

Resource Address

Dull Hair Address: https://github.com/NIUXINGJIAN/AdaptivePromptDialogBox.git
If you feel that it is helpful to you, please press it.

What can autoattentionview do for you?

First look at the macro file defined in my demo, the length of the field is different, he can give you a hint, the effect is the same as the black box of Android.
?? is the demo (Viewcontroler) experiment macro file

#defineK_text_a @ "The Umayyad"#defineK_text_b @ "The people of the Umayyad"#defineK_text_c @ "The Man of the Umayyad"#defineK_text_d @ "Lee Kuan Yew One"#defineK_text_e @ "The Umayyad Cole"#defineK_text_f @ "The Umayyad is Cole."#defineK_text_g @ "The Umayyad is for Japanese pirates." "#defineK_text_h @ "Lee Kuan Yew a People's Action Party man"#defineK_text_i @ "The Umayyad is Cole, it's Cole, it's Cole."#defineK_text_j @ "The Umayyad is Cole, it's Cole, it's Cole, it's Cole."#defineK_text_k @ "The Umayyad is for Japanese pirates." It's Cole, it's Cole, it's Cole.#definek_text_l @ Lee Kuan Yew Yi People Action Party People's Action Party#defineK_text_m @ "The Umayyad is Cole, it's Cole, it's Cole, it's Cole, it's Cole, it's Cole."#defineK_text_n @ "The Umayyad is Cole, it's Cole, it's Cole, it's Cole, it's Cole, and it's Cole."#defineK_text_o @ "The Umayyad is for Japanese pirates." It's either Cole or Cole or Cole or Cole or Cole.#defineK_text_p @ "Lee Kuan yew,1923 September 16 ~ March 23, 2015), also known as GCMG, CH, Singapore Chinese, ancestral home of Guangdong province Meizhou Dapu County High Po Town Party Creek Township, graduated from Raffles College, Singapore, one of the founders of the People's Action Party of Singapore

Run the demo click on the page to simulate the experiment, here are some of the running:

(Method of Use: + (void) Autoshowattentionwith: (NSString *) str andwith: (UIView *) View Hscale: (cgfloat) scale;) The scale parameter is -0.8;

(Method of Use: + (void) Autoshowattentionwith: (NSString *) str andwith: (UIView *) View Hscale: (cgfloat) scale;) The scale parameter is -0.8;

If you use this method to set a value such as-0.8, 1.0, 0.8 the effect is as follows, (because of the saving space here for each value (-0.8, 1.0, 0.8 corresponds to the setting of only one);

In addition, the component also implements the Help your page, using the simplest method to load no data picture, configure the demo page Click event, the simulation run demo into the next:


Adaptive Copy Prompt box, no data picture loading <ios widgets >

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.