uiscrollview

When dismissing keyboard how do I keep my existing text fields in the same location?

狂风中的少年 提交于 2019-12-11 06:54:02
问题 So I have a UIScrollView that contains UITextFields and UILabels, and when the user clicks inside a UITextField the keyboard shows. But I need a way to allow the user to dismiss the keyboard and I was try to use the swipe down gesture to do it (as in Messages). I added the Gesture Recognizer to my view in the storyboard and added the Action to the header file. Here is the method: - (IBAction)SwipeKeyboardDown:(id)sender { if(self.moveTextField) { [self.moveTextField resignFirstResponder]; } }

UITextView in UIScrollView is not scrollable

淺唱寂寞╮ 提交于 2019-12-11 06:50:47
问题 I have a UITextView in my UIScrollView . The Scrollview contains images and scrolls horizontally. The Textview is added as a subview and contains some text. Sometimes the text is quite long, so I want the textview to be scrollable. Here is what I do: UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(260, 490, 280, 86)]; [textView setBackgroundColor:[UIColor colorWithRed:63.0f/255.0f green:154/255.0f blue:201/255.0f alpha:1.0f]]; [textView setTextColor:[UIColor whiteColor]];

Android: Taking a ScreenShot for all view in ScrollView

我与影子孤独终老i 提交于 2019-12-11 06:48:47
问题 I try to take a ScreenShot for all view in ScrollView , my ScrollView has content that spills out of the screen (hence scrolling made possible), how can I ensure that the screenshot includes the elements that are not visible on the screen? I have been using this code: scroll_pp=(ScrollView)polis.findViewById(R.id.scroll_pp); int totalHeight = scroll_pp.getChildAt(0).getHeight(); int totalWidth = scroll_pp.getChildAt(0).getWidth(); Bitmap b= MethodSupport.loadBitmapFromView(scroll_pp,

iPhone: UIScrollView not scrolling when adding item via IB

放肆的年华 提交于 2019-12-11 06:37:50
问题 I'm trying to make a very simple scrolling page via IB. What I've got is a UIImageView at the top and 2 UIImageViews at the bottom, with a UITextView in the middle. I've disabled the scrolling in the UITextView as I won't the whole page to scroll up and down including the UIImageViews . Can anyone tell me why the UIScrollView won't scroll up and down? All of the items above are subviews of UIScrollView via IB . 回答1: You can only scroll in a UIScrollView if the contentSize is larger than the

Xcode 4.5 UIScrollView

陌路散爱 提交于 2019-12-11 06:22:45
问题 I'd like to add a scrollview to my project. I've added the following code in my file: - (void)viewDidLoad { [super viewDidLoad]; [scrollView setScrollEnabled:YES]; [scrollView setContentSize: CGSizeMake(320, 830)]; } This works good with xcode 4.3 und IOS 5. But know it doesn't scroll. If I deactivate Auto Layout in the file inspector it works perfect. But the layout in for iPhone 4 with the smaller display is not correct. The layout in iPhone 5 looks good. What should I do, when I want don't

iOS UIWebView Does Not Zoom Enough

江枫思渺然 提交于 2019-12-11 05:38:58
问题 I have UIWebView and have [[self webView] setScalesPageToFit:YES] . Problem When zooming in my webView the zoom isn't as magnified as it is on Safari. Question How can I accomplish the same zoom factor that Safari has? Examples This is what the first sentence at url http://www.apple.com/privacy/ looks like at max zoom: On my webView On Safari 来源: https://stackoverflow.com/questions/37977020/ios-uiwebview-does-not-zoom-enough

UIScrollView and zoomScale

Deadly 提交于 2019-12-11 05:11:04
问题 I have a scrollView and two subviews attached in that an imageView and a buttons view which holds some hotspots that have lines to the image view. I want to zoom in / out and move the hotspots accordingly. The problem i have is that i can't keep the hotspots in the place i want and can't find a solution here. here is my code in viewDidLoad - (void)viewDidLoad { [super viewDidLoad]; // set the tag for the image view [imageView setTag:ZOOM_VIEW_TAG]; imageScrollView.delegate = self; float sexy

How do I make a UIImage fade in and fade out as I scroll?

我的梦境 提交于 2019-12-11 05:06:00
问题 I have a stretchy header that I made following this tutorial http://blog.matthewcheok.com/design-teardown-stretchy-headers/. Anyway it's working perfectly but I'm having trouble making a UIView on top of it fade out as the view stretched and returning to original alpha as the view is returned to normal. Best I could come up with is this: override func scrollViewDidScroll(scrollView: UIScrollView) { updateHeaderView() var offset = scrollView.contentOffset.y if offset < -170 {

Why does the UIScrollView could not be scrolled in the iOS simulator?

时光毁灭记忆、已成空白 提交于 2019-12-11 05:05:47
问题 I'm trying to get familiar with the UIScrollView . I try to set the UIScrollView's contentSize to full width of the screen and ten times the heigh t of the screen in the corresponding ViewController's viewDidLoad method. However, when I tried to run it on the iOS simulator , I found that the view can't be scrolled . Please kindly help to give some hints & opinion. Thanks! 回答1: You need To check in your Code See 1)Check whether the UserInteraction enabled For The UIScrollView if not Please Do

how to make UIView work as an scrollview

妖精的绣舞 提交于 2019-12-11 04:42:16
问题 I need some serious help on this problem of mine where I need to work a UIView as an ScrollView . Below uploaded picture will clear all the doubts. I have taken four buttons along with a UIView below them along with 4 container views which I have placed one above the other so as to work along with the four buttons.. What I want now is to work UIView as an ScrollView . Whenever I click any button, the View moves forward as well as the it changes the container view. And respective container