mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Remove launch logo
This commit is contained in:
parent
050418b0b8
commit
2ef1de9a8c
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
|
||||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
<device id="retina6_7" orientation="portrait" appearance="light"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
|
||||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||||
@ -10,27 +10,13 @@
|
|||||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||||
<view contentMode="scaleToFill" id="O8c-13-3vw">
|
<view contentMode="scaleToFill" id="O8c-13-3vw">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
<rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
<subviews>
|
|
||||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Components/LaunchLogo" translatesAutoresizingMaskIntoConstraints="NO" id="Ra6-Gz-QsF">
|
|
||||||
<rect key="frame" x="138" y="284" width="99" height="99"/>
|
|
||||||
<constraints>
|
|
||||||
<constraint firstAttribute="width" constant="99" id="Mhj-0F-KYG"/>
|
|
||||||
<constraint firstAttribute="height" constant="99" id="gdP-J3-bQE"/>
|
|
||||||
</constraints>
|
|
||||||
</imageView>
|
|
||||||
</subviews>
|
|
||||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||||
<constraints>
|
|
||||||
<constraint firstItem="Ra6-Gz-QsF" firstAttribute="centerY" secondItem="O8c-13-3vw" secondAttribute="centerY" id="54l-Rw-Siu"/>
|
|
||||||
<constraint firstItem="Ra6-Gz-QsF" firstAttribute="centerX" secondItem="O8c-13-3vw" secondAttribute="centerX" id="zdX-Zd-oe6"/>
|
|
||||||
</constraints>
|
|
||||||
<point key="canvasLocation" x="139" y="117"/>
|
<point key="canvasLocation" x="139" y="117"/>
|
||||||
</view>
|
</view>
|
||||||
</objects>
|
</objects>
|
||||||
<resources>
|
<resources>
|
||||||
<image name="Components/LaunchLogo" width="99" height="99"/>
|
|
||||||
<systemColor name="systemBackgroundColor">
|
<systemColor name="systemBackgroundColor">
|
||||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
</systemColor>
|
</systemColor>
|
||||||
|
@ -254,11 +254,13 @@ typedef enum {
|
|||||||
_glkView.transform = CGAffineTransformIdentity;
|
_glkView.transform = CGAffineTransformIdentity;
|
||||||
} completion:nil];
|
} completion:nil];
|
||||||
|
|
||||||
|
_glkView.alpha = 0.0;
|
||||||
_pageScrollView.alpha = 0.0;
|
_pageScrollView.alpha = 0.0;
|
||||||
_pageControl.alpha = 0.0;
|
_pageControl.alpha = 0.0;
|
||||||
_startButton.alpha = 0.0;
|
_startButton.alpha = 0.0;
|
||||||
|
|
||||||
[UIView animateWithDuration:0.3 delay:0.15 options:kNilOptions animations:^{
|
[UIView animateWithDuration:0.3 delay:0.15 options:kNilOptions animations:^{
|
||||||
|
_glkView.alpha = 1.0;
|
||||||
_pageScrollView.alpha = 1.0;
|
_pageScrollView.alpha = 1.0;
|
||||||
_pageControl.alpha = 1.0;
|
_pageControl.alpha = 1.0;
|
||||||
_startButton.alpha = 1.0;
|
_startButton.alpha = 1.0;
|
||||||
|
@ -337,12 +337,6 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
|
|||||||
self.window = window
|
self.window = window
|
||||||
self.nativeWindow = window
|
self.nativeWindow = window
|
||||||
|
|
||||||
let launchIconSize = CGSize(width: 99.0, height: 99.0)
|
|
||||||
let launchIconView = UIImageView(image: UIImage(bundleImageName: "Components/LaunchLogo"))
|
|
||||||
launchIconView.autoresizingMask = [.flexibleTopMargin, .flexibleLeftMargin, .flexibleRightMargin, .flexibleBottomMargin]
|
|
||||||
launchIconView.frame = CGRect(origin: CGPoint(x: floorToScreenPixels((hostView.containerView.frame.width - launchIconSize.width) / 2.0), y: floorToScreenPixels((hostView.containerView.frame.height - launchIconSize.height) / 2.0)), size: launchIconSize)
|
|
||||||
hostView.containerView.addSubview(launchIconView)
|
|
||||||
|
|
||||||
let clearNotificationsManager = ClearNotificationsManager(getNotificationIds: { completion in
|
let clearNotificationsManager = ClearNotificationsManager(getNotificationIds: { completion in
|
||||||
if #available(iOS 10.0, *) {
|
if #available(iOS 10.0, *) {
|
||||||
UNUserNotificationCenter.current().getDeliveredNotifications(completionHandler: { notifications in
|
UNUserNotificationCenter.current().getDeliveredNotifications(completionHandler: { notifications in
|
||||||
@ -1072,7 +1066,7 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
|
|||||||
|
|
||||||
let startTime = CFAbsoluteTimeGetCurrent()
|
let startTime = CFAbsoluteTimeGetCurrent()
|
||||||
self.contextDisposable.set((self.context.get()
|
self.contextDisposable.set((self.context.get()
|
||||||
|> deliverOnMainQueue).start(next: { [weak launchIconView] context in
|
|> deliverOnMainQueue).start(next: { context in
|
||||||
print("Application: context took \(CFAbsoluteTimeGetCurrent() - startTime) to become available")
|
print("Application: context took \(CFAbsoluteTimeGetCurrent() - startTime) to become available")
|
||||||
|
|
||||||
var network: Network?
|
var network: Network?
|
||||||
@ -1105,13 +1099,6 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
|
|||||||
self.mainWindow.debugAction = nil
|
self.mainWindow.debugAction = nil
|
||||||
self.mainWindow.viewController = context.rootController
|
self.mainWindow.viewController = context.rootController
|
||||||
|
|
||||||
if let launchIconView {
|
|
||||||
launchIconView.alpha = 0.0
|
|
||||||
launchIconView.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, completion: { [weak launchIconView] _ in
|
|
||||||
launchIconView?.removeFromSuperview()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if firstTime {
|
if firstTime {
|
||||||
let layer = context.rootController.view.layer
|
let layer = context.rootController.view.layer
|
||||||
layer.allowsGroupOpacity = true
|
layer.allowsGroupOpacity = true
|
||||||
@ -1158,7 +1145,7 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
|
|||||||
let authContextReadyDisposable = MetaDisposable()
|
let authContextReadyDisposable = MetaDisposable()
|
||||||
|
|
||||||
self.authContextDisposable.set((self.authContext.get()
|
self.authContextDisposable.set((self.authContext.get()
|
||||||
|> deliverOnMainQueue).start(next: { [weak launchIconView] context in
|
|> deliverOnMainQueue).start(next: { context in
|
||||||
var network: Network?
|
var network: Network?
|
||||||
if let context = context {
|
if let context = context {
|
||||||
network = context.account.network
|
network = context.account.network
|
||||||
@ -1211,17 +1198,6 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
|
|||||||
|> deliverOnMainQueue).start(next: { _ in
|
|> deliverOnMainQueue).start(next: { _ in
|
||||||
progressDisposable.dispose()
|
progressDisposable.dispose()
|
||||||
self.mainWindow.present(context.rootController, on: .root)
|
self.mainWindow.present(context.rootController, on: .root)
|
||||||
|
|
||||||
if let launchIconView {
|
|
||||||
if context.rootController.topViewController is AuthorizationSequenceSplashController {
|
|
||||||
context.rootController.view.addSubview(launchIconView)
|
|
||||||
Queue.mainQueue().after(0.01, {
|
|
||||||
launchIconView.removeFromSuperview()
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
launchIconView.removeFromSuperview()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}))
|
}))
|
||||||
} else {
|
} else {
|
||||||
authContextReadyDisposable.set(nil)
|
authContextReadyDisposable.set(nil)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user