uiscrollview

Programmatically created labels and images don't show on screen

烂漫一生 提交于 2019-12-12 04:19:38
问题 I have the following app, that's like a chat, so I'm programmatically creating some labels, images and buttons. The problem is that the ones that I'm adding at startup do show and the ones that I'm adding afterwards don't. It's like the view needs refreshing or something. If I call the same drawing function from an IBAction set to a button...it displays the content.. if it comes from the thread event that looks for new events and notifies the class through: [[NSNotificationCenter

Programmatically added UIScrollView used in multiple methods

时间秒杀一切 提交于 2019-12-12 04:10:41
问题 So what i am trying to do is to have a screen that every time I press a button it adds a new image view to the UIScrollView i created, but i ran into a problem... because the uiscrollview was created in the viewDidLoad it isn't declared for use in the later methods... so my question is basically... how do i get around this? int pixels = 20; int playerCount = 2; -(void) viewDidLoad{ UIScrollView *mainScroll = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, 320, 400)]; mainScroll

UIScrollView is unresponsive

南楼画角 提交于 2019-12-12 04:09:57
问题 I have a UIViewController with a UIScrollView inside, all the content is displayed in the scrollview correctly, but for some reason I can't scroll thru it and all buttons are unresponsive. UIScrollView *_scrollView; _scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 768, 1024)]; _scrollView.pagingEnabled = YES; _scrollView.showsHorizontalScrollIndicator = NO; _scrollView.showsVerticalScrollIndicator = NO; _scrollView.delegate = self; _scrollView.backgroundColor = [UIColor

UIScrollView with UILabel - text fits view but images don't

…衆ロ難τιáo~ 提交于 2019-12-12 04:02:40
问题 I have a scroll view with a text label pinned to it. The text label contains html attributed text (converted by using the accepted answer here) which includes images such as graphs. I'm able to get the text to fit on screen, but the images are being cut off on the trailing side Edit: The image is being pulled in like so: <p><img src="https://lh5.googleusercontent.com/ZhaF0f-JiPOmvvFS4qor‌ -gVpqFALuXcbwM8bBHIB‌ 0I9dFRoUZkxQUx5G-0Cb‌ PcuRNnC2Zw0Ty3lp9Ykr‌ 3X00Iy0RfiLVJnsLP9Fu‌ C

SpriteKit, Swift - ScrollView Not Showing Up

╄→гoц情女王★ 提交于 2019-12-12 04:02:29
问题 Ok, so I implemented a scrollview by using this method: How to create a vertical scrolling menu in spritekit? Now when I launch the scene it doesn't display anything except a black/ grey background Here is the code I have used in the menu scene: import Foundation import SpriteKit import UIKit //let kMargin: CGFloat = 40 //var backButton = SKSpriteNode() //var selectButton = SKSpriteNode() var moveableNode = SKNode() var scrollView: CustomScrollView! private var imageSize = CGSize.zero var

Objective-C Scroll VIew not working when keyboard appears and dissapears

安稳与你 提交于 2019-12-12 03:53:39
问题 Hello I want my backgroundLoginView to move up when keyboard appears. the flow of views are like superView->scrollView->backgroundView->backgroundLoginView->textFeild1(Login Id) and textFeild2(Password) Here are my codes I want when my keyboards appears for Password the backgroundLoginView automatically moves up. MY backgroundLoginView the problem //LoginViewController.h @interface LoginViewController : UIViewController @property (strong, nonatomic) IBOutlet UIView *backgroundLoginView;

ScrollView in NIB File Swift

↘锁芯ラ 提交于 2019-12-12 03:46:33
问题 I'm trying to create a nib file where the view outlet is a uiview with a fullscreen UIScrollView. I want to add the actual view into the scrollview, if that makes sense (I will attach screen shots). I've tried a few different approaches, most being in Objective-C, but can't get this approach working. When i run the code below I get (lldb) in the console with no other error text. class ScrollViewVC: UIViewController { @IBOutlet weak var mainScrollView: UIScrollView! @IBOutlet var contentView:

My cell's resize after scrolling upwards?

余生长醉 提交于 2019-12-12 03:46:06
问题 I have a problem with my TableViewCell's layout. Currently when I scroll upwards in my tableView I have found a strange and annoying bug. When I decide to release the "scroll", meaning I am dropping "the scroll" so the "View" will return to its normal position showing all of the TableView's content, some of my cell's can for some reason re-size themselves on the width. I have no clue why this occur or what the problem might be. All my cell's are customized to fitSize depending on the height

MonoTouch UIScrollView not scrolling with dyanmic UILabel height

走远了吗. 提交于 2019-12-12 03:43:32
问题 I have a UILabel (named contentLbl) that will change dynamically within a UIScrollView. Above it is another UILabel (named contentTitleLbl) that is a title and does not contain dynamic content. To successfully scroll I know that I must at least set the ContentSize of the UIScrollView to that of the content view's. I've also seen that the Frame should be set. I have tried both but it still does not scroll. In my example code contentView contains both the contentLbl and contentTitleLbl.

how set content size of textView's Scrollview immediately when user starts scrolling or when tap on textview

假装没事ソ 提交于 2019-12-12 03:39:13
问题 I have UITextView in that in include image/ ( UIImageView ). But when i want to see the image it is unable to see / scroll, i implemented logic to increase the scroll content size dynamically with respective to the text size, - (void)scrollViewDidScroll:(UIScrollView *)scrollview { if (scrollview.contentOffset.y >= scrollview.contentSize.height - scrollview.frame.size.height) { CGSize s = [messageView.text sizeWithFont:[UIFont systemFontOfSize:25] //define your textview font size