How to Slide TextView in iphone? - iphone

Can Anyone tell me how to slide textview in iphone in the same manner as we do with images.
I am developing an application in which I want to side the TextView. I have 5 TextViews.
Can anyone help me with this.....
Thanx in advance...

You'll want a UIScrollView with paging enabled. Since with paging the view "stops on multiples of the view bounds" (according to the docs), you'd just line up your five text fields side-by-side, and make them the width of the visible area (the screen) inside a container view that sized to contain all 5.

Related

swift programming - storyboard how to add more buttons on a viewcontroller

Hi I'm new to iphone programming and I'm having problem with scrolling on the storyboard. Let's say I need to add 30 buttons on a viewcontroller inside a scrollview, but the screen size only fits 15, how do I scroll down and add more buttons.
screen shot 1
Another problem I have is that when I run the iphone app on the simulator, it can only scroll down too the button 13 even though there are 15 buttons on my view controller.
screen shot 2
Thanks for your help.
you can scroll the scrollView on the storyboard. Scroll down and then add buttons.
You need to set a size appropriate for Scroll ContentSize. Take a note at that.
Please do provide more info from. Its gonna make the resolution process easy.
Take a look at this link for solid ScrollView intro:
http://www.raywenderlich.com/76436/use-uiscrollview-scroll-zoom-content-swift
In the storyboard... Just make the view bigger. In your case, you want to change the height:
For the problem of not being able to scroll across all your images. You need to make sure the scroll view is pinned to all four sides of the parent view and that the height and width are all set-up for the content inside the scroll view. (make sure there are no warnings associated with the scroll view in the storyboard.)

UITableView static cell resize for iPhone 5

I have seen the many threads on dealing with the iPhone 5 screen, and I have a Default-568h#2x.png added. The top view of my App resizes accordingly, but I have a container that contains a UITableViewController with static cells that gets more cells added when run on the iPhone 5. I need to have the static cells resize along with the rest of the app, so they occupy the same screen area.
Storyboard lets you toggle between 3.5 and 4 inch layout, but the changes you make carry over to the other, unlike when you rotate the view to adjust layout for screen rotation....
I found a lot about adding a second storyboard for the 5, but this seems like an inefficient way to do it. Is there any other way to get the static cells to resize accordingly? Thank you much!
Set rowHeight of your tableView to self.tableView.frame.size.height / 5

How to slide button vertically in iphone?

How to slide button vertically in iphone by programmatically ?
Hey i have 7 images. and i want to display only 3 images vertically. and other images will be display when user scroll it upward.
Take a look at UIScrollView class :-) and then at UIImageView
If I understand what you want to do...
But we won't code you the thing ;-)
Good Luck.
add scrollview and setPagingEnabled =yes;
then
two way
1.add all images in view as subview and set the frame of them by one by one
2.in one view while scroll up add next image in view and remove old image.
right.Got it?
i think this tutorial will help you
http://www.edumobile.org/iphone/iphone-programming-tutorials/pagecontrol-example-in-iphone/

Appending a scrollview (horizontal) to a view which has a scrollview (vertical) and two labels Iphone sdk

I have developed an iphone application which has 6 cards (icons with images) in the Rootview. Clicking on a card would bring another view which the image being enlarged (fullScreen). The Card View has a Flip button which shows the back side of the Card which contains some text. Different cards hold different text on their back. Depending on the text size the view will be scrollable. I used two labels: one for title of the text and and second label having the whole paragraph. I have placed a scrollview below the two labels for vertical scrolling.
When a nth card is clicked from the Rootview the selected card should appear. It works perfectly. I used a separate view to design the front view of card and a different one for the text on the back. The issue is when a card is opened and flipped to see the text, it should be scrollable horizontally too apart from scrolling vertically. I dont want to redo anything. I have placed the vertical scrollview and the labels on the view representing back of card. I added another scrollview and enabled its paging property and wrote code in the following functions.
scrollViewDidScroll:(UIScrollView *)sender;
scrollViewDidEndScrollingAnimation:(UIScrollView *)newScrollView.
But it is not working as desired. No scrolling works (even the vertical 1 which was earlier working fine. I mean when i combing the horizontal scrolling both stop working.
How do i allow vertical and horizontal scrolling to this view which has two labels.
I would appreciate your help...
Thanks in advance
I solved it.
I used a table view to hold the card back details. So i get vertical scrolling by default.
I took a scrollview which will hold as many number of tableviews as there are cards.
And it is done

how to create app which can view larger than iphone screen

i create a new InputData.xib which has few text box which actually larger than iphone screen, but when i exe the app, text box which in beyond the iphone screen is hidden and i unable to scroll the screen, how this can resolve,
thanks
In general, the iPhone screen has a window that is of fixed size and position. All scrolling needs to be done with UIScrollView objects. UITextView is a subclass that works well for text. UITableView is for lists, like in the iPod app. UIScrollView itself can be used for anything else.
You should probably use a UITextView, rather than a UITextField. Make its bounds equal to the screen bounds; if there's more content than will fit, it will handle scrolling within it automatically.