iOS network status judgment scheme (supports iOS 11 and iPhone x)
In the previous iPhone, we can judge the network status according to the network status view above the navigation bar. (this kind of plan is not very good)
This solution is not available on iPhone X phones.
We can judge the network state through the Reachability
Reachability github address: https://github.com/tonymillion/Reachability
Super si ...
Posted by prosolutions on Sun, 03 May 2020 16:58:58 -0700
ios entry advertising
This article introduces a function that almost every APP needs to use. The APP starts the entry advertisement. I originally wanted to make ios android into Demo and put it on github. Considering the time relationship, it's OK. But I want to make sure that the code here can be run after copying and pasting, because I am also the God of copying a ...
Posted by Zetusko on Fri, 01 May 2020 04:11:30 -0700
Swift notes < 9 > enumeration and structure
enumeration
Enumeration concept
Enumeration defines a set of related values of a common type that you can use in your code in a safe way
Enumeration in C/OC language specifies that the related name is a set of integer values
The enumeration in Swift is more flexible. It can provide a string, a character or an integer or floating-point value
S ...
Posted by BinaryBird on Thu, 30 Apr 2020 13:44:31 -0700
On the 03 string operation of swift
String operation
01 get length
var a = "he l lo"
print(a.count) // Calculated space, output 7
02 String.Index type
The String.Index type represents the position of a character in a string.
You can use a[String.Index] to get the character at a certain position.
var a = "hello"
print(a.startIndex) // Output Index(_rawBits: 1)
print(a[a.startInde ...
Posted by Jenski on Fri, 17 Apr 2020 21:45:53 -0700
iOS componentization - Cocopods creates a private library
1, Create a folder
mkdir Module
2, Download Engineering Scaffold
pod lib create AaronSwift
Aaron Swift is the name of the component project you want to create. During the installation process, you will be prompted to enter the configuration of the project to be downloaded (as follows:), and then enter iOS, Swift, Yes, Quick and Yes. In the seco ...
Posted by BrandonKahre on Fri, 20 Mar 2020 04:48:48 -0700
What did Runtime do during the startup of Runtime objc4-779.1 App?
Knowledge preparation
First of all, we need to know a scenario. We click on the application on the screen, and then we can see that the application is fully displayed and can be operated. In this process, the system, runtime and our own code have done a lot of work, and many excellent blogs have descr ...
Posted by smerny on Tue, 10 Mar 2020 04:09:32 -0700
iPhone hides navigation bar on first page only
I have the following code to hide and show the navigation bar. It is hidden when the first view is loaded and then when "children" is called. The trouble is, when they go back to the root view, I can't find the event / action that triggered it to hide again
I have a "test" button on the root page for manual execution, bu ...
Posted by help_lucky on Tue, 18 Feb 2020 21:01:06 -0800
Swift - implement the auto hidden navigation bar of the free fish commodity list head following the slide
Recently, the epidemic broke out. I didn't have a look at the idle fish IOSApp at home. I found that the function of auto hiding the navigation bar of the commodity list was very good, so I decided to write one myself.
Leisure fish:
Train of thought:
The navigation will follow the upward movement of the ...
Posted by fantomel on Tue, 11 Feb 2020 23:22:58 -0800
iOS multi thread four: NSThread + summary
1, NSThread
It is a lightweight Multithread in iOS. One NSThread object corresponds to one thread
1. Some class methods
[NSThread mainThread]; // Get main thread
[NSThread currentThread]; // Get current thread
// Blocking the current thread and setting the sleep time are implemented in two ways ...
Posted by pjsteinfort on Sun, 19 Jan 2020 05:42:32 -0800
swift network request URLRequest
Swift network request data
viewController
import UIKit
class ViewController: UIViewController,UITableViewDataSource,MJRefreshBaseViewDelegate {
//Table attribute
var table:UITableView?
var tableDataArr:[News]?
var mjHeaderView:MJRefreshHeaderView?
var mjFooterView:MJRefreshFooterView?
var st ...
Posted by nickadeemus2002 on Sat, 04 Jan 2020 04:34:15 -0800