how to make icarousel show items in different order - ios

I use the icarousel class for my project. (This an awesome tool BTW. Thanks to the author.)
I'm trying to reach the following view:
What seems pretty easy. But it is important to keep 2 following items below the current item and just one previously observed by user item on the top. I've reached the similar view pretty easy:
As you can see the order of items is reversed. The view shows one following item below the current item and two previously observed on the top of the view.
Please advise me how to reach effect requested in the first image.
P.S.: Sorry for the links. I do not have enough reputation to post images yet.

Related

How to create a dynamic drop down within a table view?

I need to create a tableview with at least two sections, transportation and hotel. Tapping on either one creates a drop down view showing info on 1 to n examples of the topic selected. You don't know in advance what data is going to be there so it has to be dynamic to present any number of results with some having lengthy descriptions below each example and some not. I've been racking my brain and I can't figure out how to do this. The dynamic nature of this makes it extra difficult. Here is a mock up of what it should look like: click here
Check out this Git-Repo. I am using it inside my app and its working quite well. You can also watch the tutorial for it: https://www.youtube.com/watch?v=22zu-OTS-3M&t=1s
Hope that helps!

Want to achieve this kind of functionality in iphone app

I am having an app in which I want my view to be loaded like shown in the screen shot below.
The following view contains page control to show multiple images,buttons,labels,resizable text view and resizable text field in a single cell of table view.
There will be number of rows in a table view and rows will be generated dynamically.
Is there any cocoa control or tool which can give me functionality like this?
I have searched on cocoa control and goggled it a lot but couldn't find any matches to achieve this.
I thought of taking different views with sub viewing it didn't get much idea of how to generate it dynamically.
Please help me if someone has achieved this kind of functionality in any of their projects.
Thanks in advance.
Hint :
Divide each items in cells for single section, that means, one section for one item.
for e.g.
User photo, User name, User location and Post time in one cell.
Image gallery in another cell with page control on it.
Favourite (liked) post, comment on post and price in individual cells.
what you've to do is, create and add each item in a cell. While you're giving the height of each cell using delegate, check for conditions for which you're assigning the height. For e.g. if you've likes for the post (favourite) then only give height for that cell otherwise pass 0 (zero). Do the same for everything or as per your requirement.
For comments, you've to calculate text height, and based on that, you'll need to set height for comment cell.
References:
Here's a nice tutorial for this (not exactly) stuff. Rebuilding Instagram Feed Table View. I also googled a lot and found this, https://www.cocoacontrols.com/controls/stxdynamictableview, you may also need https://www.cocoacontrols.com/controls/mhpagingscrollview for showing image gallery.
P.S. This is not a "lunch plate" of course you've to make it for your self. Get hands on the keyboard! :)
Good luck!

Collapsable/Accordion like view in iOS

I am trying to develop a collapsable/accordion like feature in my iOS app. This would be your typical FAQ type feature that would be found on web sites. I would like to tap the heading and then the detail is displayed.
Since this is for the help section and there are only a few items I thought I would be super simple to embed an HTML file with some JS in it to perform the action and render it in a web view. I got that to work without an issue. It loads and works great. However, with the web view I can 'bounces'/pull down the view to reveal the background of the main view. Now, this would not be a problem normally but since the designers use some gradients it looks awful. I set bounces to false and all is well but not super smooth when scrolling.
Here is an example of the accordion I am talking about.
I then found this project.
Which is a little more on the right track. But the table view height stays fixed and does not act like the other accordion view.
My question is this....am I missing something? Should I be looking at a different design pattern? Any ideas are appreciated.
I never found the answer. I ended up creating a basic master - details table view instead.
I created an array with 4 dictionary objects. Each object has a title and an array of the items for the details.
My main table view is showing the 4 dictionary object titles and the detail view is showing the rest of the array elements. Seems fine. I was hoping to find a dynamically sizing table view but no such luck. Maybe for the next release.

Creating a Scroll View that pulls all data from an xml file

I am trying to create a "simple" photo ID app. The final product would be a series of images in a scroll view that you can click on to get more information. The images and data pertaining to the images, are all stored on a website in an XML file.
I can create an app that loads the xml into a table view, with the xml item title as the cell label, then when you click on the cell, a detail view is shown with the remaining details about the item. I can load and parse the xml into the table view without much issue. I cannot, it seems, translate this process into a scroll view app. I followed this tutorial, and a few others like it, to achieve that result.
I have looked at the apple supplied examples of UIScrollView and several dozen YouTube videos and blog tutorials on the subject of implementing a scroll view, however I have yet to find any documentation on having the data pulled from xml. The scroll view is also going to be paging so the number of pages in the scroll view need to dynamically load from the number of items contained in the xml (similar to how the tableview knows how many rows to created based on item count).
I have made a scroll view app that loads 3 pages at a time and loops, like in this tutorial. (Half way down there is a section labeled 3 Pages Only.) This app, along with the Page Control sample that Apple provides, defines the number of pages that are to be displayed, they don't pull from the plist or xml data how many items there are and adjust accordingly.
I don't know that my existing code will be of any use to anyone as it's almost identical to the related tutorials listed above. If someone wants to see something specific, let me know and I'll post it.
Can anyone help me figure out what steps I need to take to create this app? If I can get my xml data to appear in the scroll view (each item on its own page) and have the number of pages determined dynamically, I'd be pretty set and can adjust it to include images and worry about making it "clickable" later.
Just stumbled on this awesome tutorial! Don't hunt for his source code and use that as it doesn't work properly. I had to tweak it a little bit to work in iOS 5, but it works. Converting it to iPad was as simple as changing the measurements. If anyone has questions about how I made this work, let me know. video posted here

creating a dynamically expanding feed in rails

So what I have in my view atm is just a list of every item in my class. What I want to be able to do is have it only display the first ten or so, and put a button at the bottom that will then load the next ten into the page, and so on. Anyone mind pointing me towards a nice tutorial that will show me how to implement this?
I believe the functionality you are requesting is similar to "infinite scroll", which appends additional results as you scroll towards the bottom the page. You don't really need a button, unless you want to specifically design it this way.
A nice tutorial on infinite scrolling can be found here: https://github.com/amatsuda/kaminari/wiki/How-To:-Create-Infinite-Scrolling-with-jQuery

Resources