Questions tagged [snapkit]

A Swift Autolayout DSL for iOS & macOS. Use if you have questions about the library and not about Snapchat or similar services.

SnapKit is a DSL to make Auto Layout easy on both iOS and macOS.

GitHub Page

239 questions
3
votes
2 answers

How to get the height constraint declared by snapkit for UIView?

For example, I declare some constraints through snapkit for a UIView: timeProgress.snp_makeConstraints { (make) in make.left.equalTo(startTime.snp_right).offset(15) make.right.equalTo(endTime.snp_left).offset(-15) make.height.equalTo(5) …
tongxing
  • 81
  • 1
  • 6
3
votes
1 answer

UICollectionViewCell with AutoLayout not working in iOS 10

I'm trying to create a dynamic UICollectionView whose cells auto-resize based on the text inside it. But for some reasons, my custom UICollectionViewCell won't expand to the full width. I am using SnapKit as AutoLayout and all my views are…
yonasstephen
  • 2,645
  • 4
  • 23
  • 48
2
votes
1 answer

Stretchy Header with UIPageViewController

My problem seems obvious and duplicated but I can't manage to make it work. I'm trying to achieve the famous stretchy header effect (image's top side stuck to top of UIScrollView when scrolling), but with an UIPageViewController instead of simply an…
Arainty
  • 91
  • 9
2
votes
0 answers

SnapKit Android - Getting IllegalArgumentException when calling send method

Calling the SnapCreativeKitApi.send method with Android compile sdk as 31 throws a IllegalArgumentException. Does Anyone know when we will we get a sdk update from snapchat. The latest sdk version(v1.13.0)[https://kit.snapchat.com/docs/changelog]…
Shangeeth Sivan
  • 2,150
  • 1
  • 20
  • 20
2
votes
1 answer

How to account for the height of the navigation bar in SnapKit?

I am fairly new to using SnapKit and I've searched everywhere on the internet but could not find the right resource that answers my question. So here it goes. I have one UIView that is a subview of the view of the controller and I want its height to…
Junsu Kim
  • 356
  • 3
  • 13
2
votes
1 answer

Create ScrollView programmatically using Snapkit

I'm working on making scrollview programmatically using snapkit, it works scroll but the problem is that the last element(systemTeal color tempView) can't see fully. I create contentView inside Scrollview, which is containing every element. class…
2
votes
1 answer

How to set UIView height equal to max of two subviews UILabel?

I have to UILabel with dynamic height. I want to set it superview height equal to max of UILabel heights. class ComponentCell: UIView { private lazy var leftRow: UILabel = UILabel() private lazy var rightRow: UILabel = UILabel() …
2
votes
2 answers

Why UIStackView resize arranged subviews?

Why UIStackView resize subviews? I think its work when I set distribution like .fill. But .equalSpacing does not imply such behavior. I'm right? let stackView = UIStackView() stackView.alignment = .firstBaseline stackView.axis = .vertical …
2
votes
2 answers

How to setup constraints with SnapKit for UITextField and UILabel?

I have a [[TextField need max available width----]offset(10.0)][Label]]. I want to setup TextFeild pin to left and shrink all available space without label trimming and setup label to pin right and get minimal fit size. lazy var textField:…
2
votes
1 answer

How to set Multiplier of heightAnchor in SnapKit - swift

I am a new iOS programming. And i really enjoy this library of setting constraint of my views. But now i am coming with a doubt which in NSLayoutConstraint we can adjust height with multiplier of our main view. But i don't know how to achieve this…
Visal Sambo
  • 1,270
  • 1
  • 19
  • 33
2
votes
2 answers

Xcode 10 beta SnapKit constraints type error

I'm using the Xcode 10 beta 5. My project is running on Swift 4 with the 4.0.0 SnapKit. I have a function which sets up UITableView's constraints: private func setupConstraints() { tableView.snp.makeConstraints { make in …
kkiermasz
  • 464
  • 2
  • 15
2
votes
1 answer

C# Bound library method doesn't accept implementation parameter

Trying to implement the new SnapChat Creative Kit in Xamarin.iOS, I bound the SDK framework using Objective Sharpie. While following the official documentation (which only has implementation steps for swift and obj-c) for other SDKs wan not a…
ukie_
  • 116
  • 6
2
votes
0 answers

UITableView lags on build

I need help with debugging one performance issue. Overview I have two ViewController A and B. A pushes B on UIButton click. B contains UITableView. Problem When I click on UIButton in A UI freezes for 1-2 sec and then B will appear. When I remove…
Kamil Harasimowicz
  • 4,684
  • 5
  • 32
  • 58
2
votes
1 answer

Snapchat SnapKit Login on iOS 'fetchUserDataWithQuery' always fails with SCOAuth2ClientErrorDomain 403

I'm trying out Snpachat's SnapKit login api, and I've setup my project as described in the documentation/guide. I've allowed the use of all the scopes, i.e. external id, display name and bitmoji in the dashboard and added the required fields in the…
2
votes
2 answers

View animations with Snapkit

I tried different tutorials for making light animations with Snapkit but nothing seems to help. I even tried Spring framework, but that didn't work as well. Here is my code. private func setupMatchView() { view.addSubview(matchOverlayView) …
Kira
  • 1,575
  • 4
  • 26
  • 48
1 2
3
15 16