Questions tagged [componentkit]

An open source Objective-C++ view framework for iOS that is heavily inspired by React.

ComponentKit takes a functional, declarative approach to building UI. It was built to power Facebook's News Feed and is now used throughout the Facebook iOS app.

https://github.com/facebook/componentkit

21 questions
3
votes
1 answer

Why is Facebook using UICollectionView instead of UITableView for their News Feed

If someone doesn't know, Facebook open sourced a new library called componentkit The documentation says ComponentKit really shines when used with a UICollectionView. Facebook developed this lib for their news feed. That means that they are using…
Eike
  • 2,311
  • 20
  • 31
2
votes
2 answers

ComponentKit vs AsyncdisplayKit

I'm developing a social app, there is a main feature, "feeds". so far It works with auto layout, everything is fine, but considering the cost of advanced development and maintenance in the future, I am looking for other async UI solutions. I think…
PatrickSCLin
  • 1,419
  • 3
  • 17
  • 45
2
votes
2 answers

How to create a CKComponentViewAttribute for a method with multiple arguments

I want to create a component for a UIButton subclass. To setup the button i want to set the image. My problem is I don't know how to make a CKComponentViewAttribute which takes the two arguments needed for UIButton method setImage:forState:. I tried…
Onno
  • 35
  • 5
2
votes
1 answer

How to use CKStackLayoutComponent to align two labels horizontally?

I've just started playing with ComponentKit and I'm having some difficulties aligning 2 labels horizontally. I want the first one close to the left margin and the second close to the right. With auto layout, I can do it with this set of…
Adam Ernst
  • 52,440
  • 18
  • 59
  • 71
1
vote
2 answers

iOS Creating attributed label like TTTAttributedLabel in CKLabelComponent

I can easily use TTTAttributedlabel to have tappable url, name, etc. 1) How can I create something similar to that in CKLabelComponent? 2) Do I need to use CKTextComponent? [CKLabelComponent newWithLabelAttributes:{ …
Khant Thu Linn
  • 5,905
  • 7
  • 52
  • 120
1
vote
0 answers

Implementing simple uitableviewcell/collectionviewcell with Facebook Component Kit

Currently, I have already implemented with normal tableviewcell like this. I am now studying about component kit and wana do sth like that view. I am reading through their example WildeGuess. There are very little tutorial or no tutorial for using…
Khant Thu Linn
  • 5,905
  • 7
  • 52
  • 120
1
vote
1 answer

ComponentKit and FLUX architecture - avoid unnecessary re-rendering of the UI

I'm using Facebook ComponentsKit to generate my views. I now am migrating to a "flux" architecture for changing app state and triggering view updates. The main problem I have is that not all state changes should trigger a UI update. I don't…
Avba
  • 14,822
  • 20
  • 92
  • 192
1
vote
0 answers

CKComponent update without model change

I have some kind of feed with story elements which can be liked, just like Facebook has. My first step was just using the story model object to get the liked status and show that in a CKButtonComponent. The problem with that solution is that the…
Onno
  • 35
  • 5
1
vote
0 answers

CKComponentKit CollectionView issue

I am currently experimenting with ComponentKit and I am having an issue. I want to use the CKCollectionView I created on a main view. When I had the CKCollectionView to its container in my MainView(which contains a ScrollView) I am having 2 issues.…
1
vote
0 answers

remove cell separator in ComponentKit containerView

How do you remove the cell separator in ComponentKit's containerview? I have tried setting the min properties to 0 and changing inlay and such. I keep getting the separator showing up/
0
votes
1 answer

How to design a view using componentKit in iOS

I want to create a custom view using componentKit in objective-c. the view is look like the newsfeed view in facebook app , I wrote the following code to make that view, + (instancetype)newWithText:(NSString *)text …
0
votes
1 answer

Playing videos in ComponentKit

I am trying to get a video to display using ComponentKit. I want it to play on tapping the component. I found this Github Issue, so I know I need to use a CKStatefulViewComponent but I don't know what the suggested way to handle the tap event is…
Endama
  • 743
  • 8
  • 25
0
votes
1 answer

How to draw lines for CKComponent (ComponentKit Facebook)?

How to draw lines for CKComponent (ComponentKit Facebook)? I can do it using UIView-based class with drawrect method. [CKStackLayoutComponent newWithView:{ [ViewWithDrawrectMethod class], { …
Tatiana
  • 21
  • 7
0
votes
1 answer

How to assign UIGestureRecognizerDelegate to CKComponentController

I use the next code to setup UIPanGestureRecognizer in my component: MyComponent *c =[super newWithView:{ [UIView class], { { CKComponentGestureAttribute( [UIPanGestureRecognizer class], &setupPanRecognizer, …
andrey.s
  • 789
  • 10
  • 28
0
votes
2 answers

How to right align for the first component

I am trying to implement the following layout: Name: James Gender: Male Followers: Brian, Jason and Mike. I can imagine that the top level is to use CKStackLayout, but for each entry, e.g. "Name: James", how can I make the Name right align…
lorixx
  • 780
  • 1
  • 8
  • 13
1
2