The program runs as shown below:Click the button to implement the corresponding prompt box:Here only one of the pictures, interested can run the program yourself, see a few other tips box yo!!!third-party framework Mbprogresshud:Https://github.com/jdg/MBProgressHUDThe program code is as follows://Viewcontroller.mThird-party framework--hint box//Created by Mac1 on 15/10/5.Copyright (c) 2015 www.iphonetrain.com. All rights reserved.//#import "ViewController.h"#import "MBProgressHUD.h"@interface Vi
//Way 1. Show directly on view
HUD = [[Mbprogresshud ShowHUDAddedTo:self.view Animated:yes] retain];
Hud.delegate = self;
//Common settings
//Small Rectangle background color
Hud.color = [Uicolor Clearcolor]; //Here means no background
//Display of text
Hud.labeltext = @"Test";
//Detail Text
Hud.detailslabeltext = @"Test detail";
//Whether there is a Shu hood
Hud.dimbackground = YES;
[
IOS _ 3rd library MBprogressHUD
1. Add the downloaded 3rd-party library MBprogressHUD source code package to the project (which is actually a. h and. m file)
2. Go to Build Phases of the project and add all. m files in the source code package to the project.
3. Add the master header file "MBProgressHUD. h" of the 3rd-party class library"
Show Code:
// At the beginning of loading, a prompt message is displayed: MBProgressHUD * hud = [MBProgressHUD sh
During iOS development, users often encounter similar situations such as reading system resources. If the network is relatively slow, users may think that the app has crashed and the user experience is poor, foreigners are still very good at providing open source sources and learning from each other.
The progress bar of iOS can be divided into several categories. There are common ones, such as a circle, text under a circle, and text directly ..
Add the following two files to your project: MBProg
and GitHub on the demo in fact, is the small finishing, when the memo, want to do a complex effect can refer to Mbprogresshud on GitHub demo, writing is also very clear.Download the MBProgressHUD.h and. m files first and drag them into the project. Address: MbprogresshudHere is the code: (Define Mbprogresshud *hud first in the. h file;)1 //Mode 1. Show directly on view2 3HUD =[[Mbprogresshud ShowHUDAddedTo:self.view Animated:yes] retain]; 4 5 6Hud.Del
Mode 1. Show directly on viewHUD = [[Mbprogresshud ShowHUDAddedTo:self.view Animated:yes] retain];Hud.delegate = self;Common settingsBackground color of small rectangleHud.color = [Uicolor clearcolor];//here means no backgroundText to displayHud.labeltext = @ "Test";Detail textHud.detailslabeltext = @ "Test detail";Is there a Shu hood?Hud.dimbackground = YES;[HUD Hide:yes Afterdelay:2];//Display text onlyMbprogresshud *
The mbprogresshud special effect is also used in the open-source Chinese IOS client. It is mainly used to display a transitional role for applications. It is often used to open a networked page loading process to prevent false positives, if the network speed is slow, it indicates that the user is loading very hard.
On GitHub: https://github.com/jdg/MBProgressHUD
The source code also comes with a demo that shows the animation effect in 13. You can select the special effect as needed. The usage is
Mbprogresshud is an open-source project that provides prompt boxes of many styles. It is easy to use and convenient to customize the displayed content. It has powerful functions, it is used in many projects. You can download the project source code repository to GitHub. After importing the header file, you can start using it. First, take a look at the project:
Next is the complete interface of the entire demo. Here I only select a few commonly used dialogs. other styles can be found in the dem
Since January 24, Ubuntu leader MarkShuttleworth announced that Ubuntu12.04 (LTS) will introduce HUD operating technology, the "situation" of the IT industry (or even the "pattern" of the entire industry ") some subtle changes have taken place gradually. IT is very representative that, in January 26, senior IT critic Steven J. Vaghan-Nicolas published an article entitled "Linuxuserscautiouslyoptimistic
Since January 24, Ubuntu leader Mark Shuttleworth
" attribute. If yes, we will use the removetileat method to remove tile from the Mata layer and foreground layer. Compile and run the project. Now you can try watermelon!
Create a splitter
Ninja is very happy to eat watermelon, but as a game player, we want to know how many watermelons we have eaten. You know, we don't want to make him fat.
Generally, we add a label on the layer. However, wait a moment: we are constantly moving this layer. In this case, the label will not be visible. What should
objects from the JSON data stream of the Nsinputstream type, with the following comments on the function source of the option parameter:If the parser should allow top-level objects that is not a nsarray or nsdictionary. Setting the nsjsonreadingmutablecontainers option would make the parser generate mutable nsarrays and nsdictionaries. Setting the nsjsonreadingmutableleaves option would make the parser generate mutable nsstring objects.Nsjsonreadingmutablecontainers: Returns a variable containe
users are often required to perform operations.
When using Dialog, it is better to be cautious and try not to bring a bad experience to users.
2.2 Popover
Daily calendar, Weibo
Popover: a semi-transparent temporary view that appears when a user clicks a widget or an area on a page.
Popovers are commonly used to present some additional information folded in the page, or to present some quick portals for common operations on the home page.
2.3 Actionbar (Action Sheets, aciti?views)
Album, Mom
; self.theImageView.image = [UIImage imageNamed:@"noImage50x118.png"];}
Add a send button to the right of the navigation bar to process the sent information. The Code is as follows:
-(Ibaction) sendweibo o :( ID) sender {[self. thetextview resignfirstresponder]; nsstring * content = [[nsstring alloc] initwithstring: _ thetextview. text]; // calculate the number of words in the content sent to Weibo, and process nsinteger contentlength = content accordingly. length; If (contentlength> 140) {m
basically complete, followed by encoding. First, let's parse group buying information of Meituan.
Firstviewcontroller. h
#import
Firstviewcontroller. m
# Import "kkfirstviewcontroller. H "# import" mbprogresshud. H "# import" ddxml. H "# import" ddxmlelementadditions. H "@ interface kkfirstviewcontroller () {mbprogresshud * HUD; nsmutablearray * arrays;} @ end @ implementation kkfirstviewcontroller-(void) viewdidload {[Super viewdidload]; self. na
hate can not understand ...The next step is to give a "good" practice in the project. It's embarrassing.Scenario 2: Extend a hub property for Uiviewcontroller, and then take Mbprogresshud as an example#import @interface UIViewController (HUD)- (void)showHudInView:(UIView *)view hint:(NSString *)hint;@end#import "Uiviewcontroller+hud.h" #import "MBProgressHUD.h" #import Static Const void* Httpreqhudkey = httpReqHUDKey; @implementation uiviewcontrolle
set a policy for the camera to reset the projection matrix when the window size changes, set to fixed without automatically resetting the projection matrix, and the default setting is horizontal. Osg::camera::setprojectionresizepolicy.For HUD cameras, because of their use of orthogonal projection matrices, the projection matrix cannot be modified by the scaling above (the orthogonal projection matrix is not only related to the aspect ratio, but also
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.