bhlvoong / lbtatools Goto Github PK
View Code? Open in Web Editor NEWSet of tools to drastically improve development speed of UI in iOS applications
License: MIT License
Set of tools to drastically improve development speed of UI in iOS applications
License: MIT License
I follow the instruction running the basic LBTAListController<MessageCell,UIColor> but keep getting
required public init?(coder aDecoder:NSCoder) {
fatalError()
}
Thread 1: Fatal Error
under the LBListHeaderController class pod file
Was wondering about possibly modifying the anchor method to have an additional property at the end. Add in a isActive: Bool = true
. That way we can make multiple sets of constraints and activate and deactivate as needed.
Example would be a set of default constraints and a set of constraints for Accessibility text sizes.
Like this:
@discardableResult
open func anchor(top: NSLayoutYAxisAnchor?, leading: NSLayoutXAxisAnchor?, bottom: NSLayoutYAxisAnchor?, trailing: NSLayoutXAxisAnchor?, padding: UIEdgeInsets = .zero, size: CGSize = .zero, isActive: Bool = true) -> AnchoredConstraints {
translatesAutoresizingMaskIntoConstraints = false
var anchoredConstraints = AnchoredConstraints()
if let top = top {
anchoredConstraints.top = topAnchor.constraint(equalTo: top, constant: padding.top)
}
if let leading = leading {
anchoredConstraints.leading = leadingAnchor.constraint(equalTo: leading, constant: padding.left)
}
if let bottom = bottom {
anchoredConstraints.bottom = bottomAnchor.constraint(equalTo: bottom, constant: -padding.bottom)
}
if let trailing = trailing {
anchoredConstraints.trailing = trailingAnchor.constraint(equalTo: trailing, constant: -padding.right)
}
if size.width != 0 {
anchoredConstraints.width = widthAnchor.constraint(equalToConstant: size.width)
}
if size.height != 0 {
anchoredConstraints.height = heightAnchor.constraint(equalToConstant: size.height)
}
[anchoredConstraints.top, anchoredConstraints.leading, anchoredConstraints.bottom, anchoredConstraints.trailing, anchoredConstraints.width, anchoredConstraints.height].forEach{ $0?.isActive = isActive }
return anchoredConstraints
}
please give an example, how to trigger an action in the controller.
Thank you!
Can support multiple types UICollectionViewCell and UICollectionReusableView ?
Hi, Keyboard cannot focus to UITextView, Please fixed :(((
It is there a way to use LBTAListController for multiple sections?Except customise the datasource.
I just installed the pod on a project targeting iOS 13 and received the following error. XCode 11.4
'shared' is unavailable in application extensions for iOS: Use view controller based solutions where appropriate instead.
LBTAFormController.swift
@objc fileprivate func handleKeyboardShow(notification: Notification) {
...
if alignment == .center {
scrollView.contentInset.bottom += UIApplication.shared.statusBarFrame.height
}
...
}
Please add carthage support for project.
pod install won't get latest (even when pointing to github with tag 1.0.17)
s.version = '1.0.12
s.source = { :git => 'https://github.com/bhlvoong/LBTATools.git', :tag => s.version.to_s }
can you update LBTATools.podspec please?
Please public a variable to change background color of separator view.
very clean and neat
how i can add . Stack into contentView of tableView ?
@sereisoglu , @bhlvoong , @ArtemMartus , @zakbarlow1995 is there is any way to register delegate for cell ? As there is no method like cell for row so where someone can register delegate ?
hi...
thanks a lot for your efforts you are great man ...
i saw all your video in youtube ..
really I have two question
I add button for cell but how can addtarget according the indexpath.item to do my func..
can you tell us if we can swap between views lick your youtube app and put in the top tow button to swap between it..
Hi,
First of all thank you for this lib !
Just wanted to know if UITextfield could be underlined in your form controller ?
I used the function below in some projects and it was working fine but as soon as it's embedded in the FormController stack, there is not underline anymore.
extension UITextField {
func underlined(){
let border = CALayer()
let lineWidth = CGFloat(1)
border.borderColor = UIColor.black.cgColor
border.frame = CGRect(x: 0, y: self.frame.size.height - lineWidth, width: self.frame.size.width, height: self.frame.size.height)
border.borderWidth = lineWidth
self.layer.addSublayer(border)
self.layer.masksToBounds = true
}
}
Here is the setup, I removed some fields, buttons and stuff in the description below easier to see for you I guess:
[name, address1 ...].forEach(applyTextFieldStyle)
formContainerStackView.stack(name, nameError, ...), spacing: 8).withMargins(.init(top: 16, left: 8, bottom: 16, right: 8))
Here is the function to setup my textfields:
private func applyTextFieldStyle(textfield: UITextField) {
textfield.constrainHeight(40)
textfield.delegate = self
textfield.textColor = .black
textfield.backgroundColor = .clear
textfield.font = .systemFont(ofSize: 13)
textfield.underlined()
}
Would be really nice if someone could find my miss in there, I'm stuck on that and I'd really love to use this lib.
Regards
This problem show only I use my real device
Hi I'm trying to insert LBTA Tools using the pod 'LBTATools'
As soon as the pod is installed and I start my app, my app crashes with this error .. where am I wrong?
this is the error
dyld: Library not loaded: @rpath/LBTATools.framework/LBTATools
Referenced from: /private/var/containers/Bundle/Application/5A3136F6-7A0B-4FFC-8080-49A73122A0D2//
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/5A3136F6-7A0B-4FFC-8080-49A73122A0D2//Frameworks/LBTATools.framework/LBTATools: code signature invalid for '/private/var/containers/Bundle/Application/5A3136F6-7A0B-4FFC-8080-49A73122A0D2//Frameworks/LBTATools.framework/LBTATools'/private/var/containers/Bundle/Application/5A3136F6-7A0B-4FFC-8080-49A73122A0D2//Frameworks/LBTATools.framework/LBTATools: stat() failed with errno=25
/private/var/containers/Bundle/Application/5A3136F6-7A0B-4FFC-8080-49A73122A0D2//Frameworks/LBTATools.framework/LBTATools: code signature invalid for '/private/var/containers/Bundle/Application/5A3136F6-7A0B-4FFC-8080-49A73122A0D2//Frameworks/LBTATools.framework/LBTATools'/private/var/containers/Bundle/Application/5A3136F6-7A0B-4FFC-8080-49A73122A0D2//Frameworks/LBTATools.framework/LBTATools: stat() failed with errno=1
/private/var/containers/Bundle/Application/5A3136F6-7A0B-4FFC-8080-49A73122A0D2//Frameworks/LBTATools.framework/LBTATools: code signature invalid for '/private/var/containers/Bundle/Application/5A3136F6-7A0B-4FFC-8080-49A73122A0D2//Frameworks/LBTATools.framework/LBTATools'/private/var/containers/Bundle/Application/5A3136F6-7A0B-4FFC-8080-49A73122A0D2//Frameworks/LBTATools.framework/LBTATools: stat() failed with errno=1
Dear Brian,
first of all thanks for these tools! They are quite awesome and give swift a bit of a swiftui touch :) I started using stacks and was wondering if it possible to change the width or height of elements within the stack using an animation. I tried it but I guess this does not play with all the constraints. Can you tell me if it is possible and if so, how? Thanks for the help and keep up the good work!
How can I round the corners of the container (not the cell) when using LBTATools ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.