forked from organicmaps/organicmaps-tmp
[MAPSME-5993] [ios] Code cleanup.
This commit is contained in:
parent
a5271d1c39
commit
52a40aa177
4 changed files with 10 additions and 10 deletions
|
@ -2,10 +2,10 @@ import UIKit
|
|||
|
||||
extension String {
|
||||
func size(width: CGFloat, font: UIFont, maxNumberOfLines: Int = 0) -> CGSize {
|
||||
if (isEmpty) {
|
||||
return CGSize(width: width, height: 0);
|
||||
if isEmpty {
|
||||
return CGSize(width: width, height: 0)
|
||||
}
|
||||
|
||||
|
||||
let maximumHeight = maxNumberOfLines == 0 ? CGFloat.greatestFiniteMagnitude : font.lineHeight * CGFloat(maxNumberOfLines + 1)
|
||||
let constraintSize = CGSize(width: width, height: maximumHeight)
|
||||
let options: NSStringDrawingOptions = [.usesLineFragmentOrigin, .usesFontLeading]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Foundation
|
||||
|
||||
fileprivate func IPAD() -> Bool { return UI_USER_INTERFACE_IDIOM() == .pad }
|
||||
private func IPAD() -> Bool { return UI_USER_INTERFACE_IDIOM() == .pad }
|
||||
|
||||
func L(_ key: String) -> String { return NSLocalizedString(key, comment: "") }
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ final class PhotoScalingView: UIScrollView {
|
|||
private func centerScrollViewContents() {
|
||||
let horizontalInset: CGFloat = contentSize.width < bounds.width ? (bounds.width - contentSize.width) * 0.5 : 0
|
||||
let verticalInset: CGFloat = contentSize.height < bounds.height ? (bounds.height - contentSize.height) * 0.5 : 0
|
||||
contentInset = UIEdgeInsetsMake(verticalInset, horizontalInset, verticalInset, horizontalInset)
|
||||
contentInset = UIEdgeInsets(top: verticalInset, left: horizontalInset, bottom: verticalInset, right: horizontalInset)
|
||||
}
|
||||
|
||||
private func updateImage(_ photo: GalleryItemModel?) {
|
||||
|
|
|
@ -3,11 +3,11 @@ import UIKit
|
|||
final class WhatsNewController: MWMViewController, WelcomeProtocol {
|
||||
|
||||
static var welcomeConfigs: [WelcomeConfig] = [
|
||||
// WelcomeConfig(image: #imageLiteral(resourceName: "img_whats_new_route"),
|
||||
// title: "whats_new_title_route",
|
||||
// text: "whats_new_message_route",
|
||||
// buttonTitle: "whats_new_next_button",
|
||||
// buttonAction: #selector(nextPage)),
|
||||
// WelcomeConfig(image: #imageLiteral(resourceName: "img_whats_new_route"),
|
||||
// title: "whats_new_title_route",
|
||||
// text: "whats_new_message_route",
|
||||
// buttonTitle: "whats_new_next_button",
|
||||
// buttonAction: #selector(nextPage)),
|
||||
WelcomeConfig(image: #imageLiteral(resourceName: "img_whats_new_ugc"),
|
||||
title: "whats_new_ugc_title",
|
||||
text: "whats_new_ugc_message",
|
||||
|
|
Loading…
Add table
Reference in a new issue