[UIApplication Sharedapplication].keywindow
Get the UIWindow where a uiview is located
View.window
Four objects ( Uiapplication,appdelegate,uiwindow,uiviewcontroller) diagram
Info.plist Common Settings
After building a project, you will see a "project name-info.plist" file under the supporting Files folder, which is very important for the project to do some run-time configuration, and cannot be deleted. In the project created by the older
, according to the level of abstraction from low to high, such as socket, stream mode, url method. Here I introduce you to the URL programming method.(1) URL programming modeURL Programming mode for network programming through URLs, any network resources to be accessed (including LAN and WAN) can be represented and accessed by a URL, and support resource sharing between devices. The URL Programming mode system provides five kinds of protocols, such as HTTP, HTTPS, file, FTP, data, etc., and allo
IOS Development Review notes (1)-Basic OC knowledgeI have been studying IOS for more than three months since I went to work. Because of the weak foundation, I learned from the basic syntax of OC and read the books of grapefruit and grapefruit one after another, now I am looking at the actual programming practice. take this opportunity to make a good summary: 1. n
say that UIWebView and Wkwebview did too much trouble, and now there's no reason to reject something new. In Wkwebview, Uiwebviewdelegate and UIWebView are heavily composed of 14 classes and 3 protocols, and some wkwebview versions of the methods commonly used in UIWebView are given below.Preparing to load the pageUIWebViewDelegate - webView:shouldStartLoadWithRequest:navigationTypeWKNavigationDelegate - webView:didStartProvisionalNavigation:Started
, reachability, and more. There are also a number of applications will use the basic module, such as Hbapi, Hbsns, Hbfoundation (HB for the company first letter) and so on, you can build a private git repo, and then add to Podfile, so if the Hbapi is updated, only need podJust update it, please. By the way, hbfoundation, this git repository can put in some of the small modules that all the apps you write are basically going to use. If a lot of apps will jump out of a alertview for a while, you c
,retain) Uiviewcontroller *rootviewcontroller;Automatically add Rootviewcontroller view to UIWindow, responsible for managing the Rootviewcontroller lifecycleCommon methods-(void) Makekeywindow;Make current UIWindow into Keywindow (main window)-(void) makekeyandvisible;Make the current UIWindow into Keywindow and show it3, the acquisition of UIWindow[UIApplication sharedapplication].windowsA list of UIWindow that opens in this app so you can touch any of the UIView objects in your app(usually in
Translated from http://www.modejong.com/iOS/#ex7
In his blog, Mo DeJong provides seven interesting sample SDK programs (for xcode 3.2.5 and iOS 4.2). "These programs and prompts are specifically written for developers, however, the source code is open to the public in the "as-is" mode ". I will test these seven sdks. The author is lazy, but I will give the code snippets and, if necessary, the modified Code
constant let radius = 10VAR is used to declare the variable var age = 20 or var x = 0.0, y = 0.0, z = 0.02. You can basically use any character you like as a constant and variable name(1) letπ= 3.14159(2) Let URL = "http://ios.itcast.cn"(3) Let???? = "Puppy and cow"// ?? And?? It's a emoji expression, a special Unicode character.You can use shortcut keys on your Mac: Control + COMMAND + space, pop-up emoji keyboard3. Note Points for constants and variable namesCannot contain mathematical symbol
:@"SearchText"]; [Searchtests Addobject:result]; } returnsearchtests;}//Delete all search Records-(BOOL) deleteallsearchtext{nsstring*sql =@"DELETE from T_history"; BOOL Isdeletesuc=[_fmdatabase Executeupdate:sql]; if(ISDELETESUC) {NSLog (@"Delete succeeded"); returnYES; } returnNO;}@endAttention
If the ID is set to gradual and is set to autogrow, then after deleting the data in the table, reinsert the new data, the ID number is not starting from 0, but the previous ID is numbe
The general idea of AF1.NSURLConnection + nsoperationNsurlconnection + nsoperationnsurlconnection is the cornerstone of the foundation URL loading system. A nsurlconnection asynchronously loads a Nsurlrequest object, invokes delegate's Nsurlresponse/nshttpurlresponse method,Its nsdata is sent to the server or read from the server, delegate can also be used to handle Nsurlauthenticationchallenge, redirect responses, or determine how nscachedurlresponse is stored in a shared On the Nsurlcache. Nso
Forstate:uicontrolstatenormal] ; 6 7 Self.window.rootViewController = Rootviewcontroller;As described above, I designed the style of the dynamic switch skin as follows:
1. First build the corresponding component class according to style, for example, you have several buttons, you can implement several button classes on inheritance.
2. Set the global style flag.
3. Trigger the style modification where the message is sent through th
iOS development Method swizzling in layman's
As long as the use of Google, there are many online Method Swizzling demo, here I do not intend to post code, the main introduction of the concept, principles, precautions and so on.
Development RequirementsIf the product manager suddenly says, "Add statistical functionality to all pages, that is, users e
iOS development language Swift Getting started serial-inheritanceA class can inherit (inherit) another class's methods (methods), property, and other attributes. When a class inherits from another class, the inheriting class is called the subclass (subclass), and the inherited class is called the superclass (or parent class, superclass). In Swift, inheritance is a basic feature of distinguishing between "cl
iOS development language Swift Getting started serial-MethodsA method is a function that is associated with some particular type. Classes, structs, enumerations can define instance methods, and instance methods encapsulate specific tasks and functions for instances of a given type. Classes, structs, enumerations can al
Recently, a brother to interview iOS development, he talked about, the interviewer asked him how to divide the directory structure, but also specifically asked each subdirectory of the file name.
The directory structure is really important, and the interviewer asks him that he is definitely trying to spy on his development experience. A clear directory structur
In the iphone development, XML parsing has many options, the IOS SDK provides Nsxmlparser and libxml2 two class libraries, as well as a number of Third-party class libraries to choose from, such as Tbxml, Touchxml, Kissxml, TinyXML and Gdataxml. The question is which one should you choose?There are usually two ways to parse XML, DOM and SAX:When the DOM parses XML, it reads the entire XML document and const
Target-action: Target-action mode, which runs through iOS development always. But for beginners, it is still confused by this pattern.In fact, the target-action pattern is simple, that is, when an event occurs, call that method in that object. For example: When the button is pressed, the click Method inside the controller is called. "That object" is target, "that method" is the action, and the controller is
’;This is because of the two classes in the code that are caused by the use of a #import direct or indirect circular reference, which occurs at compile time. For example, a circular reference that has been in, classA #import or has classB classB #import classA been separated by several layers.The workaround is to find the class that is referenced by the loop, and then reference it in a way that is used in the file of any class that produces a circular
In iOS development, all kinds of controls perfectly solve the problem of interface and interaction in the development process, make the iOS product interface more flexible and practical, the iOS common control is introduced as follows。1. Window UIWindowThe iphone rules are a
1. PrefaceA clear project directory structure facilitates project development and is also part of the software architecture, so it is important to build the directory structure of the project at the beginning of its development. When I first turned to iOS, I did not know how to build the project directory of the app, after participating in the
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.