How to perform sequential request with Alamofire and update a progressHUD at every step in Swift 3
How can I force landscape mode in one viewController
When landscape, textField's inputAccessoryView doesn't shown
Animating autoLayout doesn't work
When can I activate/deactivate layout constraints?
TL;DR: Delete weak statement from IB Outlet decleration.
How to angle a uilabel in ios [duplicate]
TL;DR: Use 'func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath)' from UITableViewDelegate
TL;DR: you just need to take permission of TransportSecurit to YES in info.plist file
How can i change marker icon while clustering, Google Maps, iOS
TL;DR: You should add your code to below function, for adding custom marker icon
- (GMSMarker *)markerWithPosition:(CLLocationCoordinate2D)position
from:(CLLocationCoordinate2D)from
userData:(id)userData
clusterIcon:(UIImage *)clusterIcon
animated:(BOOL)animated
Move a view up only when the keyboard covers an input field
Gist for my solution is [here](https://gist.github.com/uy/783ab5bbeeea84a5a4288d12384b05a3).
How to set cornerRadius for only top-left and top-right corner of a UIView?
extension UIView {
func roundCorners(corners: UIRectCorner, radius: CGFloat) {
let path = UIBezierPath(roundedRect: bounds, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius))
let mask = CAShapeLayer()
mask.path = path.cgPath
layer.mask = mask
}
}TextField's value change handling
// case: textfields' isEnabled property depend on each other's value
// Setup Func
private func setupTextfields() {
tfSerialNumber.tag = 1
tfSerialNumber.addTarget(self, action: #selector(textFieldValueChanged(textField:)), for: .editingChanged)
tfRequestNumber.tag = 2
tfRequestNumber.addTarget(self, action: #selector(textFieldValueChanged(textField:)), for: .editingChanged)
}
// Target Func
@objc private func textFieldValueChanged(textField: UITextField) {
if let t = tfSerialNumber.text {
if !t.isEmpty {
tfRequestNumber.text = ""
tfRequestNumber.isEnabled = false
} else {
tfRequestNumber.isEnabled = true
}
}
if let t = tfRequestNumber.text {
if !t.isEmpty {
tfSerialNumber.text = ""
tfSerialNumber.isEnabled = false
} else {
tfSerialNumber.isEnabled = true
}
}
}Moya : Parameter Encoding for POST method not working. #1116
public var parameterEncoding: ParameterEncoding {
switch self {
case .postMethodButParametersShouldSendOverURL:
return URLEncoding(destination: .queryString)
default:
return URLEncoding.default
}
}