Search Results

Search found 393 results on 16 pages for 'uiscrollview'.

Page 8/16 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • UIPopoverController. Is there way to use Interface Builder to layout the VC and View it Contains?

    - by dugla
    Since UIPopoverController is often a container for a non-trivial amount of view hierarchy, it would be nice to do the layout of the VC and View it contains in Interface Builder rather then programmatically. Has anyone found a good work flow for do this? For example I want to embed a UIScrollView in a UIPopoverController and I am not excited about having to do it all programmatically. Thanks in advance. Cheers, Doug

    Read the article

  • Convert UIViews made programmatically to UIScrollViews

    - by Scott
    So I have a bunch of UIViews that I made programmatically and placed a bunch of content on (UIButtons, UILabels, UINavigationBars, etc.), and most of these views are going to need to actually be UIScrollViews instead. Now keep in mind I made all these through code not the Interface Builder. What I first tried was to just change each declaration of a UIView to a UIScrollView instead, and that compiled and ran fine, however, they were not scrollable. It's REALLY weird. Here is the code that I change into UIScrollViews, although it doesn't scroll: - (void)loadView { //allocate the view self.view = [[UIScrollView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; //self.view = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; //set the view's background color self.view.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"MainBG.jpg"]]; [self.view addSubview:[SiteOneController myNavBar1:@"Sites"]]; NSMutableArray *sites = [[NSMutableArray alloc] init]; NSString *one = @"Constution Center"; NSString *two = @"Franklin Court"; NSString *three = @"Presidents House"; [sites addObject: one]; [one release]; [sites addObject: two]; [two release]; [sites addObject: three]; [three release]; NSString *element; int j = 0; for (element in sites) { UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; UIFont *myBoldFont = [UIFont boldSystemFontOfSize:20.0]; UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(20, b + (j*45), c, d)]; [label setBackgroundColor:[UIColor clearColor]]; label.text = element; label.font = myBoldFont; UIImage *img = [UIImage imageNamed:@"ButtonBase.png"]; [button setImage:img forState:UIControlStateNormal]; //setframe (where on screen) //separation is 15px past the width (45-30) button.frame = CGRectMake(a, b + (j*45), c, d); // [button setTitle:element forState:UIControlStateNormal]; button.backgroundColor = [SiteOneController myColor1]; [button addTarget:self action:@selector(showCCView:) forControlEvents:UIControlEventTouchUpInside]; [button setTag:j]; [self.view addSubview: button]; [self.view addSubview:label]; j++; } } What am I doing wrong?

    Read the article

  • iphone sdk: clickable image in UIWebView

    - by origon
    Hi. I wanna wrap some text around a UIButton or clickable image in some kind of scrollview. My ide was to add an UIButton to an UIWebView, but thats not possible? Is there a way to wrap text around an UIButton in an UIScrollView or UITextView? Or can I add an image to the UIWebView and handle the clicking somehow?

    Read the article

  • Hiding a navigation bar via scrolling (safari style)

    - by eagle
    After a page is loaded in Safari on the iPhone, when you begin scrolling down, the navigation bar is also scrolled out of view. When you scroll back up, the navigation scrolls back into view. I'm looking to implement this same behavior using a UIWebView underneath the UINavigationBar, but I'm guessing it should be possible with any UIScrollView descendant. How can this behavior be implemented?

    Read the article

  • Simulating graphing paper on iPhone

    - by Rick
    I need to implement 'graphing paper' in an iPhone app. The user should be presented with a grid. They user can touch individual squares to turn them on, or if they're already on, off.The user can pinch to zoom and scroll around the paper as well.. So far I'm thinking Quartz 2D + UIScrollView is the way to do this but these are both areas of iPhone development that I'm unfamiliar with. Does this seem like a reasonable strategy?

    Read the article

  • How to remove subviews to release more memory

    - by Tankista
    I have UIScrollView with number of subviews. Each subview is custom UIButton with UIImage. When I load more and more subviews, more and more memory is used. But I remove invisible subviews by removeFromSuperView method. Subviews are removed and stay invisible, but Im afraid that no memory is released. UIImage is image downloaded from internet. Thanx for help.

    Read the article

  • what is the required code method of making a sticker app?

    - by zeropt7
    I am new to photo apps, recently I am interested in making a sticker app like those can be seen in the appstore, I know I would need to use uiimagepickercontroller, uiscrollview and uigesturerecognizer. However I wonder which code method should I use for the app to load multiple stickers? Should it be called programmatically? Is that I would need to use the if-statement, say if one sticker is loaded, the app will auto generate a new sticker on top of it?

    Read the article

  • UIScrollView setZoomScale not working ?

    - by iFloh
    Hi, I am struggeling with my UIScrollview to get it to zoom-in the underlying UIImageView. In my view controller I set - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView { return myImageView; } In the viewDidLoad method I try to set the zoomScale to 2 as follows (note the UIImageView and Image is set in Interface Builder): - (void)viewDidLoad { [super viewDidLoad]; myScrollView.contentSize = CGSizeMake(myImageView.frame.size.width, myImageView.frame.size.height); myScrollView.contentOffset = CGPointMake(941.0, 990.0); myScrollView.minimumZoomScale = 0.1; myScrollView.maximumZoomScale = 10.0; myScrollView.zoomScale = 0.7; myScrollView.clipsToBounds = YES; myScrollView.delegate = self; NSLog(@"zoomScale: %.1f, minZoolScale: %.3f", myScrollView.zoomScale, myScrollView.minimumZoomScale); } I tried a few variations of this, but the NSLog always shows a zoomScale of 1.0. Any ideas where I screw this one up?

    Read the article

  • iPhone SDK can't get UIScrollView to work with a UIWebView

    - by Maxwell Segal
    I am building an app that in part of it has two views - one portrait and one landscape. And I want to offer scrolling and pinch & zooming on the landscape orientation. I've built the two views and the simple UIImages in the landscape view all work OK but it does not seem to insert my UIWebView into the UIScrollView. I've done this before with UIImage and all was OK but I must be missing something here - can anybody help with some advice. I'm sure it's something very simple - perhaps to do with the adding of the subview??. Thanks in advance of your help. I've shown the relevant parts of my code below: @interface MonthViewController : UIViewController <UIScrollViewDelegate> { MonthViewController *monthController; IBOutlet UIView *portraitView; IBOutlet UIView *landscapeView; IBOutlet UIWebView *monthKWHChartPortrait; UIWebView *monthKWHChartLandscape; IBOutlet UIScrollView *scrollChartLandscape; IBOutlet UIImageView *eLogoPortrait; IBOutlet UIImageView *eLogoLandscape; IBOutlet UIImageView *clientLogoPortrait; IBOutlet UIImageView *clientLogoLandscape; IBOutlet UIActivityIndicatorView *loadIndicatorPortrait; IBOutlet UIActivityIndicatorView *loadIndicatorLandscape; NSTimer *timer; IBOutlet UILabel *test; } -(UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollChartLandscape { return monthKWHChartLandscape; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight); } -(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { [super willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:duration]; if (toInterfaceOrientation ==UIInterfaceOrientationLandscapeRight) { NSLog(@"right"); test.text=@"right"; NSString *urlAddressLandscape = @"http://PRIVATEURLHERE.aspx?WIDTH=440"; NSURL *urlLandscape = [NSURL URLWithString:urlAddressLandscape]; NSURLRequest *requestObjLandscape = [NSURLRequest requestWithURL:urlLandscape]; [self.monthKWHChartLandscape loadRequest:requestObjLandscape]; scrollChartLandscape.contentSize = CGSizeMake(monthKWHChartLandscape.frame.size.width, monthKWHChartLandscape.frame.size.height); scrollChartLandscape.maximumZoomScale = 2.5; scrollChartLandscape.minimumZoomScale = 0.6; scrollChartLandscape.showsHorizontalScrollIndicator = YES; scrollChartLandscape.showsVerticalScrollIndicator = YES; scrollChartLandscape.clipsToBounds = YES; scrollChartLandscape.delegate = self; [self.scrollChartLandscape addSubview:monthKWHChartLandscape]; self.view=landscapeView; //self.view.transform=CGAffineTransformMakeRotation(deg2rad*(90)); //self.view.bounds=CGRectMake(0.0, 0.0, 480.0, 320.0); } else

    Read the article

  • Cocos2D, UIScrollView, and initial placement of a scene

    - by diatrevolo
    Hello: I am using a UIScrollView to forward touches to Cocos2D as outlined in http://getsetgames.com/2009/08/21/cocos2d-and-uiscrollview/ Everything works great after a few days of working with it, except one thing: when the initial view appears on the screen, the background appears to be scrolled to the center. As soon as I try to scroll around, the image jumps to 0,0, and everything works as normal, except the touches are offset by half the width and height of the background image. Am I overlooking something basic? I can't think of a useful portion of the code that illustrates the issue, as I can't track it down, but would be happy to post code if anyone has any ideas. Thanks in advance, -Roberto

    Read the article

  • iPhone Horizontal Scrolling Table

    - by Wireless Designs
    Hello all - I need to create a view on the iPhone that scrolls horizontally through a gallery of images. The issue is that this gallery has the potential to have 100s to 1000s of images that needs to be presented, so I would like to avoid loading them all into a single UIScrollView at once and destroying performance. I need to create a view that recycles the view objects (like UITableView) to increase performance and reduce memory overhead, but it needs to scroll in a horizontal fashion. Any ideas? Is it possible to make UITableView operation horizontally? Thanks!

    Read the article

  • Adding a header view to a UIWebView similar to Safari and Articles

    - by MrMage
    I'd like to add a header view to an UIWebView similar to the address/search bar in MobileSafari and the excellent Articles.app by Sophia Teutschler. More precisely, I'd like to create a "pull to fix orientation" view above a UIWebView, just like in Articles. Articles does use a UIWebView, so it seems to be possible. Is there a way to accomplish this without having to embed the UIWebView into a UIScrollView and updating its size all the time, as described in this article? Apparently, I do need the scrolling events to have the "pull to fix orientation" behave accordingly.

    Read the article

  • iPhone: Howto get notified when an UIView becomes visible

    - by arne_
    Is there a way to get a notification, a callback or some other means to call a method whenever a UIView becomes visible for the user, i.e. when a UIScrollview is the superview of some UIViews, and the ViewController of such a UIView shall get notified when its view is now visible to the user? I am aware of the possible, but not so elegant solution of checking to which position the ScrollView scrolled (via UIScrollViewDelegate-methods) and compute if either one of the subviews is visible... But I'm looking for a more universal way of doing this.

    Read the article

  • Transform/redraw view after pinch zoom on x-axis

    - by Jonathan
    My setup. UIScrollView (scrollView) - UIView (contentView) - UIView (subView) I have managed to do so I can zoom contentView only on the x-axis. The problem is that subView is containing a graph. When contentView is zoomed and transformed the graph gets unsharp and distorded since the scaling only effect the x-axis. What I need help with is to somehow redraw the contentView after I'm done with the zooming without distorting the graph. Is it possible to transform the contentView so that the graph stays sharp even if you only zoom in the x-axis or redraw the content in the zoomed/stretched view somehow? I have tried the solution in this thread link but haven't succeeded to get it running.

    Read the article

  • Tiling solution for the iPhone that can handle infinite # of tiles

    - by rickharrison
    I have been looking at ways to implement a tiling solution on the iPhone/iPad similar to something like Google Maps. I have looked at examples of how to implement a CATiledLayer into a view that is inside a UIScrollView. Then when you scroll the view, the tiles request the new data to be shown. However, this seems to work when you have a finite view size (ie: 3000x3000). However, how could I work this into a tiling solution for much larger sizes. Basically, I want to be able to show data as needed for tiles as large as I can. Can I somehow use CATiledLayer to do this? Any direction would be greatly appreciated.

    Read the article

  • How to make scrolling through images as fast as Apple's Photos app

    - by clozach
    The Goal — On an iPhone, to browse through several hundred locally-stored jpgs using a UIScrollView. The Problem — Like many others before me, I've tried implementing a scroll view based on Apple's Page Control sample code and found it lacking. The biggest issue I'm currently up against is that the sample code's architecture doesn't seem to scale. With just a few images loaded from disk, everything's fine. Once the number of images gets into the dozens, though, scrolling suffers terribly: the scrollview stutters mid-scroll with each new swipe. The only code I've toyed with that comes even close to being reasonably responsive is Three20, but even there the performance doesn't hold a candle to Photos. For now, I'm just using Three20, but a faster, custom solution would definitely be preferable.

    Read the article

  • Add programmatically clickable Button with custom Views layouted in InterfaceBuilder

    - by allisone
    I have a UIScrollView. In there I add buttons programmatically. Right now I just use UIButton and set one title. But I need to have an UIImage View in there, that will change upon certain events, Text that will change too etc. and I would like to style that in Interface Builder, but I can't figure out how to do this. Which class should I extend, and what kind of xib should I create and what in there, so that in the end I can make the right connections and so that I can listen for UIControlEventTouchDown of that Button.

    Read the article

  • Loop a UIScrollviw with ViewControllers

    - by Jim
    Hi I'm trying to create a UIScrollView with loop that contains a collection of ViewControllers. The answer to this question here shows the code that is the basis for what I'm trying to do. It uses images instead of viewControllers. I've managed to get the all the viewControllers loaded (4) and displaying but the first view which is a duplicate of the last viewController is blank. I've tried creating a copy of this viewController and adding it to the array but this messes up the transition / count. Any suggestions?

    Read the article

  • How can I reset my UI when the user presses a button?

    - by Fasttracks
    I have 1 scrollview that contain 18 buttons. 1) when a user taps on any button, a button is added to a second UIScrollView. 2) Then, when a user taps on that button on second scrollview the button is removed from second scrollview. both uiscrollviews contain a list of their buttons. Afree both of these steps, I have to reload my scrollview. Can I do the same task by adding observer, so that it will automatically reload when any action done on button, and if yes then how?

    Read the article

  • Problem releasing UIImageView after adding to UIScrollView

    - by Josiah Jordan
    I'm having a memory problem related to UIImageView. After adding this view to my UIScrollView, if I try to release the UIImageView the application crashes. According to the stack trace, something is calling [UIImageView stopAnimating] after [UIImageView dealloc] is called. However, if I don't release the view the memory is never freed up, and I've confirmed that there remains an extra retain call on the view after deallocating...which causes my total allocations to climb quickly and eventually crash the app after loading the view multiple times. I'm not sure what I'm doing wrong here though...I don't know what is trying to access the UIImageView after it has been released. I've included the relevant header and implementation code below (I'm using the Three20 framework, if that has anything to do with it...also, AppScrollView is just a UIScrollView that forwards the touchesEnded event to the next responder): Header: @interface PhotoHiResPreviewController : TTViewController <UIScrollViewDelegate> { NSString* imageURL; UIImage* hiResImage; UIImageView* imageView; UIView* mainView; AppScrollView* mainScrollView; } @property (nonatomic, retain) NSString* imageURL; @property (nonatomic, retain) NSString* imageShortURL; @property (nonatomic, retain) UIImage* hiResImage; @property (nonatomic, retain) UIImageView* imageView; - (id)initWithImageURL:(NSString*)imageTTURL; Implementation: @implementation PhotoHiResPreviewController @synthesize imageURL, hiResImage, imageView; - (id)initWithImageURL:(NSString*)imageTTURL { if (self = [super init]) { hiResImage = nil; NSString *documentsDirectory = [NSString stringWithString:[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]]; [self setImageURL:[NSString stringWithFormat:@"%@/%@.jpg", documentsDirectory, imageTTURL]]; } return self; } - (void)loadView { [super loadView]; // Initialize the scroll view hiResImage = [UIImage imageWithContentsOfFile:self.imageURL]; CGSize photoSize = [hiResImage size]; mainScrollView = [[AppScrollView alloc] initWithFrame:[UIScreen mainScreen].bounds]; mainScrollView.autoresizingMask = ( UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); mainScrollView.backgroundColor = [UIColor blackColor]; mainScrollView.contentSize = photoSize; mainScrollView.contentMode = UIViewContentModeScaleAspectFit; mainScrollView.delegate = self; // Create the image view and add it to the scrollview. UIImageView *tempImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0, 0.0, photoSize.width, photoSize.height)]; tempImageView.contentMode = UIViewContentModeCenter; [tempImageView setImage:hiResImage]; self.imageView = tempImageView; [tempImageView release]; [mainScrollView addSubview:imageView]; // Configure zooming. CGSize screenSize = [[UIScreen mainScreen] bounds].size; CGFloat widthRatio = screenSize.width / photoSize.width; CGFloat heightRatio = screenSize.height / photoSize.height; CGFloat initialZoom = (widthRatio > heightRatio) ? heightRatio : widthRatio; mainScrollView.maximumZoomScale = 3.0; mainScrollView.minimumZoomScale = initialZoom; mainScrollView.zoomScale = initialZoom; mainScrollView.bouncesZoom = YES; mainView = [[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds]; mainView.autoresizingMask = ( UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); mainView.backgroundColor = [UIColor blackColor]; mainView.contentMode = UIViewContentModeScaleAspectFit; [mainView addSubview:mainScrollView]; // Add to view self.view = mainView; [imageView release]; [mainScrollView release]; [mainView release]; } - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView { return imageView; } - (void)dealloc { mainScrollView.delegate = nil; TT_RELEASE_SAFELY(imageURL); TT_RELEASE_SAFELY(hiResImage); [super dealloc]; } I'm not sure how to get around this. If I remove the call to [imageView release] at the end of the loadView method everything works fine...but I have massive allocations that quickly climb to a breaking point. If I DO release it, however, there's that [UIImageView stopAnimating] call that crashes the application after the view is deallocated. Thanks for any help! I've been banging my head against this one for days. :-P Cheers, Josiah

    Read the article

  • How i zoom perticular part of UIScrollView?

    - by Rajendra Bhole
    HI, I develop an application in which i want to implement the splash screen, on that splash screen i want to bind the scrollView and UIImage. My code as follow, -(void)splashAnimation{ window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, 320, 420)]; //scrollView = [[UIScrollView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; scrollView = [[UIScrollView alloc] initWithFrame:[window bounds]]; scrollView.pagingEnabled = NO; scrollView.bounces = NO; UIImage *image = [UIImage imageNamed:@"splash.png"]; UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; imageView.userInteractionEnabled = NO; [scrollView addSubview:imageView]; [scrollView setDelegate:self]; //[scrollView release]; } - (void)applicationDidFinishLaunching:(UIApplication *)application { [self splashAnimation]; [self initControllers]; [window addSubview:[mainTabBarController view]]; [window makeKeyAndVisible]; } On my given code the one blank window comes up and stay on. I want to on that blank screen bind my splash.png. *The Above problem is solved* My current code is scrollView.pagingEnabled = NO; scrollView.bounces = NO; UIImage *image = [UIImage imageNamed:@"splash.png"]; UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; imageView.userInteractionEnabled = NO; [scrollView addSubview:imageView]; scrollView.maximumZoomScale = 4.0f; scrollView.minimumZoomScale = 1.0f; CGRect rect = CGRectMake(119, 42, 208, 166); [scrollView zoomToRect:rect animated:YES]; [scrollView setDelegate:self]; [window addSubview:scrollView]; [window makeKeyAndVisible]; i want to zoom the particular part of scrollView.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >