IOS Swift - Grid View layout [closed] - ios

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
How to implement custom grid view layout in iOS swift with custom cells and cells can be resized or aligned anyway. To be exact I have added image.

This is a UICollectionView with custom waterfall-style layout.
You can achieve the same look with CHTCollectionViewWaterfallLayout. You just need to subclass the collection view's layout in the identity inspector.

It's not as easy as it seems actually. You need to subclass UICollectionViewLayout for this behaviour. There is a detailed description of how to do this in the documentation; see Creating Custom Layouts . I also highly recommend UICollectionView Custom Layout Tutorial: Pinterest by Ernesto Garcia.

Related

how to programmatically add view to scrollview in alloy [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm struggling to implement adding dynamic content to the scrollview in the controller. In my xml, I've a horizontal scrollview. I need to add multiple views to the scrollview programmatically from the controller. How can I do it programmatically in Appcelerator Alloy ?
2 ways possible, depending on the complexity of the view you want to add.
1)
Create a controller for the view, then add it
$.scrollViewId.add(Alloy.createController('subViewController').getView());
2)
If it is a simple view, just do
$.scrollViewId.add(Ti.UI.createView());
Since this is a pretty basic thing to do in Titanium/Alloy, you might want to dive into the documentation about Alloy https://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Concepts
There are some extra chapters about Alloy in the menu on the left

How do I create this type of view in iOS [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm trying to experiment with swift and I was thinking of making something like the picture. But I can't figure out what views they are using. Can someone just explain if it is a collection view, table view or is it a collection view embedded in a table view?
Example
It appears to be either a UICollectionView or UITableView, with UICollectionViews embedded in each cell.
A UITableView should be fine for the main container view, as it provides vertical scrolling, and then UICollectionViews can be used for the horizontally scrolling content in each cell.

Animate navigation bar with a flexible height in xcode 11 using Swift [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
Any ideas how to create like this animation on iOS using Swift ? Thanks
There are three ways to achieve this (probably more than three):
Create a custom header and listen to your table view Scroll, then update the header based on the offset.
Use a third party library like this one:
https://material.io/components/ios/catalog/flexible-headers/
Follow a tutorial (there are many of them): https://www.youtube.com/watch?v=lML5XMLrZEk
Sometimes it is better to do that by yourself, but in this case, I think a framework could help you.
I think it's not the UINavigationBar. You could change nav bar alpha then add custom view to table view or collection view and create animation that you need when scrolling.
Custom Collection view flow layout or ScrollView with UIScrollViewDelegate adjusting the header height when content offset is changing.

swift multiple buttons inside table view cell [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
How to create view like in image to stretch to all width programmatically
https://cocoapods.org/pods/FlexLayout
I would recommend using something like FlexLayout. It handles laying views out however you determine that you want to lay them out, can handle changing widths, stacking in columns or in rows. Think if it similar to stack views the way you can lay them out. You don't need to use any constraints with this library. (I do not have any connection to the library at all).

Any way can implement the function as picture shows [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
As you see, a image cycle show area. is it in the first cell of table or some other ways implement?
Does it scroll with the content or is it static?
If it scrolls with the content:
Using tableHeaderView is the easiest solution.
If it is static:
Just layout as a separate view above the UITableView in Interface Builder or code.
You can create a small pagecontrol with scrollView and add that to tableHeaderView and then you can achieve the functionality shown in picture.

Resources