The first is the most common one-dimensional array:
Defining a one-dimensional arrayNsarray *array1 = @[@ "0", @ "1", @ "2"];A member in an array based on the subscriptNSLog (@ "%@", array1[0]);
Then the two-dimensional array:
Defining
As we all know, UITableView is a very common UI, but sometimes we run into a uitableviewuitableviewdatasource protocol where Cellforrowatindexpath does not execute, possibly as follows:
1.tableView width or height is equal to 0;
In this case
The simple time selector, in fact, is to take advantage of the Uitextfield Inputview attribute. Look directly at the code:
#import "ViewController.h"@interface Viewcontroller () {Uitextfield *textfiled;NSString *timestr;}@end@implementation
The following view (multiple-view sliding-click Switch) is useful in many apps. Using encapsulated view, external call to an API can be achieved, very convenient.
Git code: Https://github.com/HelloYeah/HYTabbarView.
Add a child controller
1. Create a custom Uicollectionviewcell
Selected works, right key-new File ... Select "Cocoa Touch Class"-next, choose to inherit from the Uicollectionviewcell class, give a reasonable name Collectionviewcell, and then complete the Next.
1
For example, Taobao after the purchase of merchandise evaluation, evaluation of the evaluation list, each individual evaluation of the content of different, evaluation content has less, we generally use UITableView to create the interface, this time
First of all, Uialertview and Uiactionsheet in iOS9 after the official Apple is not recommended, but use Uialertcontroller to replace.There are pictures to testify
So it is necessary to learn how to use Uialertcontroller.
1. Get the
When you use the navigation controller Navigationcontroller to jump to another page, you can return to the previous layer by sliding to the left of the left corner of the screen, except by clicking the return button on the left-hand side. However,
The default Uirefreshcontrol Drop-down Refresh interface is a daisy progress bar + A description of text, slightly monotonous. In fact, we can use our own created interface view, to facilitate our implementation of various effects. For example, add
There are two styles of UITableView: Uitableviewstyleplain and uitableviewstylegrouped. There is no essential difference between the two, but the latter is displayed in the Normal style by the group style. Today we'll look at the use of groups:
1,
Fmdb is a lightweight database in a Xcode that is used to store network resources locally. Therefore, Fmdb is a very practical, very important point of knowledge. Here is a simple example, based on the fmdb of the TIM-censored operations, the code
Header and footer are additions to the layout of the view flow. By default, these views are disabled in the flow layout. However, there are several things you can do to configure header and footer views:
First, drag CollectionView, and related
The first step, drag two space textfiled and button to the storyboard on the Viewcontroller.
The second step, drag the line, link to the. h file in the following code:
@property (Weak, nonatomic) Iboutlet UIButton *l_timebutton;
In the third
Viewcontroller Load View
When loaded from the storyboards, the Initwithcode is invoked, and the Init is invoked if it does not exist. The Awakefromnib method is then invoked for each object inside.
In the case of alloc out of memory, the Init
Look at an effect chart first.
It seems simple, but it's not. Next I will share with you in this demo I encountered some of the pits, I believe that the same as I iOS development beginners will certainly help.
First, one of my first ways was to
In the iOS development process, log log is the most common use of the NSLog () function, debug by default NSLog () will output log to the console display, and app released after we do not need to display the log, The strategy at this point is not to
A more commonly used foundation method for converting an object to Jsondata:+ (Nullable NSData *) Datawithjsonobject: (ID) obj options: (nsjsonwritingoptions) opt error: (NSERROR * *) error;The error that this method passes is the pointer to the
Sometimes it is necessary to judge whether the password for registration, login, or forgotten password will contain spaces.I encapsulated a method on my own that could be judged by the value of the bool returned.
-(BOOL) IsEmpty: (NSString *) str
The new Xianjian Qixia game was in a hot test, but many iOS players encountered the embarrassment of recharge failure in the game. The official team also provided a solution for the first time. Let's take a look at it.Solution for unjailbroken users:
1. Download and install mobile phone remote controlFor iOS devices, go to the App Store to search for the TP mini and download and install it: 2. Connect iOS devices and TP mini to the same LAN Taking the TP mini big-eye series as an example, 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.