我已经在UITextField
. 当我设置文本时,它位于左侧图标上方。我想在UITextField
. 我使用了下面的代码。
let imageView = UIImageView(image: UIImage(named: strImgname))
imageView.frame = CGRect(x: 0, y: 0, width: imageView.image!.size.width , height: imageView.image!.size.height)
let paddingView: UIView = UIView.init(frame: CGRect(x: 0, y: 0, width: 50, height: 30))
paddingView.addSubview(imageView)
txtField.leftViewMode = .always
txtField.leftView = paddingView
Run Code Online (Sandbox Code Playgroud) 我使用视图控制器作为模态.我想从下到上指定它的高度.这意味着它从底部到高度打开.我用波纹管代码打开模态:
let popUpVc = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "NewController") as! NewController
self.addChildViewController(popUpVc)
//Transition from bottom
let transition = CATransition()
transition.duration = 0.5
transition.type = kCATransitionPush
transition.subtype = kCATransitionFromTop
view.window!.layer.add(transition, forKey: kCATransition)
popUpVc.view.frame = self.view.frame
self.view.addSubview(popUpVc.view)
popUpVc.modalPresentationStyle = UIModalPresentationStyle.overCurrentContext
popUpVc.didMove(toParentViewController: self)
Run Code Online (Sandbox Code Playgroud)
请帮我..
我使用 android build->analysis apk 从我的 .apk 中看到了以下报告。
我已经使用 progrud 像
buildTypes {
release {
shrinkResources true
minifyEnabled true
zipAlignEnabled true
//Other parameters
debuggable false
jniDebuggable false
renderscriptDebuggable false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Run Code Online (Sandbox Code Playgroud)
但我的调试 apk大小是26.9 MB。当我想构建发布 apk时,它的大小变为 23.5 MB。它的尺寸很大。请帮助我减少我的 apk 或减少至少 60%。谢谢埃纳穆尔