Apple (ios) family APP advertisement push, photo, photo album, calendar message push, [iMessage apple push], [Apple family push group], [imessage album push]

Solution
If you fully accept Apple's default function, then you don't need to edit any code.
If you are more careful in the first place and have configured the value of modalPresentationStyle, then you will not have this effect.
For students who want to get back the original default interaction, just set the following directly:
self.modalPresentationStyle = UIModalPresentationOverFullScreen;

insert image description here

3.1.6 The private property _placeholderLabel of UITextField is prohibited from being accessed.
Calling the following code under IOS 13 will cause a flashback
[self.textField setValue:self.placeholderColor forKeyPath:@“_placeholderLabel.textColor”];
1
Print the malpractice information as follows:

‘Access to UITextField’s _placeholderLabel ivar is prohibited. This is an application bug’

Recommended content IMESSGAE related

Author ✈️@IMEAE recommended content iMessage Apple Push Software *** Click to view the content information requested by the author
Author ✈️@IMEAE recommended content 1. Family push content *** Click to view the content information requested by the author
Author ✈️@IMEAE recommended content 2. Album push *** Click to view the content information requested by the author
Author ✈️@IMEAE recommended content 3. Calendar Push *** Click to view the content information requested by the author
Author ✈️@IMEAE recommended content 4. The installation of the virtual machine is simple *** Click to view the content information requested by the author
Author ✈️@IMEAE recommended content 5. iMessage *** Click to view the content information requested by the author

Solution:
UITextField has an attribute of attributedPlaceholder, we can customize this rich text to achieve the effect we need.

NSMutableAttributedString *placeholderString = [[NSMutableAttributedString alloc] initWithString:placeholder attributes:@{NSForegroundColorAttributeName : self.placeholderColor}];
_textField.attributedPlaceholder = placeholderString;
1
2
3
4
iOS 13 Via Process KVC method to modify public attributes, there is a risk of Crash, be careful use! Not all KVCs will crash, try it!


3.1.7 UISearchBar indicates that the height of the title
SearchBar is only 1px. After upgrading to iOS13, the SearchBar on the UISearchController behaves abnormally. After inspection, it is found that the corresponding height is only 1px. At present, no specific reason has been found. The solution is: Use KVO to monitor the frame
value After the change, set the height that should be displayed.
Black line handling crash
In the past, in order to solve the black line problem of the search box, UISearchBarBackground will be deleted after traversal, which will cause UI rendering to crash in iOS13; the solution is:
set the layer.contents of UISearchBarBackground to nil
TabBar Red dot offset
If the position of the red dot was set by the position of the picture on the TabBar before, on iOS13 you will find that the display position is on the far left. Traverse the subViews of UITabBarButton and find that UITabBarSwappableImageView can only be obtained when the TabBar is selected. The
solution is: Change to set the frame of the red dot through the position of UITabBarButton
3.1.8 Dark Mode
Apps on iOS 13 are expected to support dark mode
Use system colors and materials
Create your own dynamic colors and images Leverage flexible infrastructure
insert image description here

The UI needs a new set of interactions

In iOS13, a new API-overrideUserInterfaceStyle is extended for UIViewController and UIView. The usage method, the official document roughly says this:
by setting the overrideUserInterfaceStyle property, the view and its subviews have a specific UIUserInterfaceStyle. But if you want to get the future UIUserInterfaceStyle, you need to use traitCollection.userInterfaceStyle instead.
Use the overrideUserInterfaceStyle property on UIViewController whenever possible. Use this property only when:
(1) Partially using a specific format on a single view or lower view hierarchy layout.
(2) You want to use a specific style on all UIWindows and their view controllers and modal popup ViewControllers, and you don't want to force changes to all application-owned styles. (If you absolutely want your entire app to have a certain style, don't use it, but set the UIUserInterfaceStyle key in your Info.plist.)
When set on a normal UIView:
this property only affects this view and its subviews Characteristics.
It does not affect any view controllers or subviews of other view controllers.
When set on a UIWindow:
This property affects the rootViewController and thus the entire view controller and view hierarchy.
It also affects the interface that the window modal enters.
Therefore, it can be seen that overrideUserInterfaceStyle will not only affect itself, but also affect its own subviews. Changing the window will affect all views and view controllers in the entire window, including view controllers that jump out of modals.
Moreover, it is also specially emphasized in the document that you can set the entire application to use a certain style. The specific method can be through code, or through info.plist to set the configuration key User Interface Style, and the corresponding Value is Light/Dark.
if #available(iOS 13.0, *) { window?.overrideUserInterfaceStyle = .light; } 1 2 3




3.1.8.1 Adapt to the dark mode
Adapt to the dark mode mainly from these aspects:
simulator debug (simulator debug),
picture (assets),
color (color),
status bar (status bar), etc., which directly read the URL of the local file method, and under Debug we also see such a reading method:

jsCodeLocation = [NSURL URLWithString:@“http://localhost:8081/index.ios.bundle?platform=ios&dev=true”];
1
If we change this URL to the URL on the long-distance server, we can read it dynamically The latest JS Bundle is available. But in fact, this method is not feasible, because it takes time to load JS Bundle remotely, and we can't make users wait there. So I thought of another way, by checking after entering the App, if there is a new version of the JS Bundle, download the new Bundle. And this can be dealt with in two ways:
1. Directly report to the user that a new capital package is being downloaded, and let the user wait through the loading interface
; Load a new resource pack when using the App for the first time.
What I want to introduce below is the second method. That is, through background updates. In order to allow users to get the latest JS Bundle every time they open the App, we let them read the JS Bundle from the Document. The new version of the JS Bundle also exists in this directory after downloading, similar to the following code:

NSURL *jsCodeLocation;
jsCodeLocation = [self URLForCodeInDocumentsDirectory];
if (![self hasCodeInDocumentsDirectory]) { //Read JS Bundle from Document BOOL copyResult = [self copyBundleFileToURL:jsCodeLocation]; if (!copyResult) { //Failed to copy, Read from main Bundle jsCodeLocation = [self URLForCodeInBundle]; } } RCTBridge *bridge = [self createBridgeWithBundleURL:jsCodeLocation]; rootView = [self createRootViewWithBridge:bridge]; 1 2










Guess you like

Origin blog.csdn.net/IMEAE/article/details/130556860