; };The workaround is as follows. It is not possible to place __unsafe_unretained directly on the line where the person object was created. Because if that's the case, the person object is a weak pointer, and is born dead. The purpose of introducing weak pointer Person0 is to use a weak reference when the person0 of the Block code refers to the object, so that no 2 strong references are pointed to each other. You can also use __weak. Person *person=[[person Alloc]init]; __unsafe_unretai
coordinates of the PIN, title and sub-title >>> finally add the pin to the mapThe core is: The system comes with a pin can not set the coordinates (read-only), so we generally write a model of inheritance NSObject, the Coordinate,title,subtile attribute is written in, the key is that this model needs to follow #import Then use:-(void) viewdidload { [super viewdidload]; ...... Monitor click, Pin [Self.mapview addgesturerecognizer:[[uitapgesturerecognizer alloc] initwithtarget:self ac
]; Self.reversedetailaddresslabel.text=pm.name; } }];}(7) Supplementary Cllocationmanager of another knowledge, scope of monitoring. For example, 360 children watch the function of entering an area and leaving an area on the alert.-Compliance with agreements cllocationmanagerdelegate>--Then, create a zone, the first method below has been reimbursed, now with the second method, that is clregion with clcircularregion to create this is not very easy to think.Clregion *region=[[clregion al
Error:nil]; [[Avaudiosession sharedinstance] Setactive:yes Error:nil];The avaudiosessioncategoryplayback is set to indicate that the user is switching to silent mode or the lock screen is ignored and the music continues to play. And don't play music from other apps, of course you can set Kaudiosessionproperty_overridecategorymixwithothers to mix music with other apps.In addition to Avaudiosessioncategoryplayback, there are the following other categoryNSString *const avaudiosessioncategoryamb
(1) Using media playback, you need to load the -Full screen settings need to be set after the view is visible to be valid.--all kinds of control is realized by notification Nsnotificationcenter, there is a full screen to enter/exit, play pause state change and so on.#import "WPMoviePlayController.h" #import (2) What is the runtime?--That's all the things that each method/function calls between each other.--In most cases, the runtime runs silently behind the scenes, and it is primarily used to wr
IOS Dev (54) When the keyboard pops up, the view moves with it
Tai Rui elder brother
Blog: http://prevention.iteye.com
-Add Listener[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeContentViewPosition:) name:UIKeyboardWillShowNotification
PCH file one of the important role is that you can write some macro variables, and macro variables are mainly to judge the device, judge the system version of these.You need to manually build the PCH file in Xcode6.(1) First set up a PCH file(2) Set, so that the PCH file can be used, that is, the PCH file in the entire project's header file, can be shared by any file. On the right, click Enter $ (srcroot)/project name/pch file name, such as $ (srcroot)/net lottery/wpprefixheader.pch, both in the
, the experience is poor, not recommended)So, in the VIEWCONTROLLER7.M:Add a method to try to appear, and in this setting move Tabbar down, remove the entire screen, equivalent to disappear-(void) Viewdidappear: (BOOL) animated{ nsarray *arr1= Self.tabBarController.view.subviews; UIView *view1=[arr1 objectatindex:0]; Uitabbar *tabbarview1=[arr1 objectatindex:1]; The first view is full screen, does not need to be full height, so can not do any settings //view1.frame=cgrectmake (0,
will cover the first use of the above 8 default simple animation//such as Cube, Rippleeffect, SuckeffECT, Oglflip, Pagecurl, Pageuncurl [emailprotected] "oglflip"; After the animation is set, it is the time to set the animation, that is, the display and exit effects such as fade and so on//seemingly no effect, and can still omit to write [Animation1 settimingfunction:[camediatimingfunction Functionwithname:kcamediatimingfunctioneaseineaseout]]; The most important step is to load this anim
When you create a new project, Bundle identifier=organization identifier+product Name. But their recognition of Chinese is unified into a dash-.So when creating a number of projects, it is necessary to pay attention to the use of less Chinese, if you want to use Chinese, then the guarantee is not purely Chinese or Chinese readme is not the same, or a few bundles indentifier the same, the user will overwrite the old app when installing. Because this is the app's unique identity.Question of "
other words, if you plan to go on long term, the code is unavoidable, but only for the amateur play, use storyboard bar.(3) Storyboard, NIB files and code to achieve the advantages and disadvantages of the UIIt's a good idea to use a simple project that someone has developed.Well, the bird thought about it. For beginners who want to get into the line, the main focus is on code learning, with storyboard as an aid to better understand view controllers, views, controls, and various jumps. As to w
IOS Dev (48) initializer and convenience constructor
InitializerYou should be familiar with this.- (id)initWithSomething;Convenience constructorHowever, in practice, we often use the following statements:[[Foo alloc] init];If you define this product as a method, as follows:+ (id)buildInstance;In addition to simple writing, what is the difference?Initializer is automatically written by the compiler as fo
IOS Dev (39) Do you understand UIApplicationDelegate?
application:didFinishLaunchingWithOptions:applicationWillResignActive:applicationDidBecomeActive:applicationWillEnterBackground:applicationWillEnterForeground:applicationDidReceiveMemoryWarning:Application: didfinishlaunchingwitexceptionsThis is the first protocol method triggered after the UIApplication is instantiated. The main task of this product
IOS Dev (16) is one of the sections on some basic OC knowledge points.
Author: CSDN laruence
Blog: self in static methods of http://blog.csdn.net/prevention1Use self and self to represent this class in static methods (class methods. For example, the following two methods mean the same: + (void) wtf { [self alloc]; } + (void) wtf { [ClassName alloc]; }The true meaningAn obj
nonsense not much to say, directly on the code:/** * Tableviewcell Split Line left top /** * Tableviewcell split line left top In the TableView xib only found the setseparatorinsets settings, in the cell xib also found the same settings, but no effect. Should we find setlayoutmargins in the xib? But not found. The great God saw if he could give a hint. Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced. "
As the complexity of the program logic increases, do you also find that some viewcontroller in the app have a sharp increase in the number of lines of code, reaching 2, 3,000 lines, or more. This can be a headache if you want to add a little bit of functionality or modify existing logic. If you're having this kind of problem, it's time to stop and think about how to better organize the code and lean on the VC. This article will explain how to combine the ideas of MVC to help your VC lean while i
options:UIViewAnimationOptionTransitionNone animations:^{ self.bottomButton.frame = CGRectMake(SCREEN.width / 2 - 25, SCREEN.height - 50, 50, 50); } completion:NULL];The button disappears is actually removes the screen, here I added a rotation of excessive animation, need what animation effect can choose. The button appears to set the frame of the button to the frame at the time of initialization.This allows us to control the appearance and disappearance of the bottom button by sliding the Ui
Use the Modal method. In fact, the following two methods are used.The switching effect of the modal mode is rendered from the bottom.-(void) clickmodal{ wpviewcontroller *wp=[[wpviewcontroller alloc]init]; [Self presentviewcontroller:wp animated:yes completion:^{ }];}-(void) clickdismiss{ [self dismissviewcontrolleranimated:yes completion:^{ }];}In general, not very much. The use of the place is mainly in a few of the same type of controller between. Suppose there
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.