how to use UISCROLLVIEW? [duplicate] - ios5

This question already has answers here:
Are there any good UIScrollView Tutorials on the net? [closed]
(5 answers)
Closed 7 years ago.
i have to use UIScrollView , I've 5 uiimageview and i should to scroll them, but i don't know how to do!Anyone can help me? or tell me a good tutorial where i can learn fast all
things about uiscrollview,
thank you guys

// create a new scroll view and add to window
UIScrollView * scrollView = [[UIScrollView alloc] initWithFrame:scrollFrame];
[self.view addSubview:scrollView];
For tutorials check out this question Are there any good UIScrollView Tutorials on the net? [closed]

Related

Horizontal and vertical scrolling in a UITableview [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 want to make a lineup for a festival. You can see what I want to achieve below here.
You can scroll in every direction ,horizontal - vertical and from left to right corner (don't know the proper word in english).If you scroll in one section ever other section should scroll with it.
My question is know how can you achieve this? I'm searching for days to get this working but don't find a good solution...
The row in the UITableView doesn't scrolls itself inside the UITableView. one solution Is to use an UIScrollView and then inside add the UITableView. This UIScrollView will have the same size that your UITableView have now, but the UIScrollView contentSize property will have the same height but it would have a greater width.
UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectMake(x, x, x, x) style:...]
[scrollView addSubview:tableView];
// Set the size of your table to be the size of it's contents
// (since the outer scroll view will handle the scrolling).
CGRect tableFrame = tableView.frame;
tableFrame.size.height = tableView.contentSize.height;
tableFrame.size.width = tableView.contentSize.width; // if you would allow horiz scrolling
tableView.frame = tableFrame;
// Set the content size of your scroll view to be the content size of your
// table view + whatever else you have in the scroll view.
// For the purposes of this example, I'm assuming the table view is in there alone.
scrollView.contentSize = tableView.contentSize;
For better understanding with UITableView scrolling you can follow this two links
horizontally table scrolling
vertically table scrolling
i hope it helps you for better understanding and make familiar with UITableViewDelegate. Thanks

UITextView text border [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Border around UITextView
I want to create a border around the text in a UITextView. I was able to accomplish this by creating 8 separate UITextViews and offsetting them to the 8 pixels around the center text. This looks really nice, but inputting text is severely slowed since the view has to update 9 transparent UITextViews simultaneously every time the user types something!
Is there a cleaner/faster way of accomplishing this? The effect I want is similar to photoshops 'stroke' modifier.
Can you put screenshot of what u mean by border around the text ?
If you want to have the border for UITextView try out following, this should work
#import <QuartzCore/QuartzCore.h>
UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(10, 10, 300, 100)];
textView.layer.borderColor = [[UIColor redColor] CGColor];
textView.layer.borderWidth = 2;
I'm not sure why my answer was deleted, perhaps because I posted the same solution on an almost identical question? You can find it there:
Bordered UITextView

How to diable horizontal scrolling of uitable view? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Disable UITableView horizontal scroll
Please can any one tell me how to disable horizontal scrolling of tableview..
Kindly help..
If your tablecontentview width is same as your view width it will not scroll in horizontal way but if you want that your tableview should not bounce then you can disable bouncing of your tableview as
m_TableView.bounces = NO;

Gauge implementation in iOS [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I need to implement the gauge in iOS:
Can anyone provide me some idea about how to do this?
I've referred MeterView for iOS but have no idea about how to customize it.
That looks like they are using 3 views. A background view, the needle view and a foreground semi-transparent gloss view.
The background and gloss views are static regular UIImageViews. The needle is a UIImageView with a affine rotation transformation applied to it.
Assuming your needle UIImage view is called needle:
UIImageView *needle = ...;
float theAngle = ...; //How much to rotate, note that this is in radians not degrees
needle.transform = CGAffineTransformMakeRotation(theAngle); // This rotates your needle UIImageView

Problem regarding draw image [duplicate]

This question already has an answer here:
Closed 11 years ago.
Possible Duplicate:
How to set this Layout in iPhone need Some help
I draw image in imageview.
I have one image view and Button is there.
When i draw something it show like this,
I dont wan't to show drawing on that button.
How can i do that?
There are 2 approaches:
1) You can do this IB:
Drag your UIImageView in IB to bottom of your stack subviews of view where your UIView (where you are drawing) is placed.
2) You can do this in code:
Push your view on the top of views using following method
- (void)bringSubviewToFront:(UIView *)view
For example:
UILabel * labelgreen;
[labelgreen.superview bringSubviewToFront:labelgreen];