Scale in UIScrollView

UIScrollView can do all the scaling for us. But it scales both in horizontal and vertical direction.Is there any way to scale in horizontal only?

Sorry...what is it you want to do, exactly?
Use one image/source but scale it depending on use?
Zoom on an image/source?
Else...?

Similar Messages

  • Curves in UIScrollView and zoom : how to keep the width ?

    Dear all,
    I have a very simple issue. I successfully implemented a UIScrollView with a Bezier Curve, and the zoom is also working fine. (I'm also using a CATiledLayer to improve the final render. But it's optional for this issue...)
    The point is the following : if I zoom in, the width of the curve will be increased (original width * Zoom). So, to keep a good width at the screen, I reduce dynamically the width (CGContextSetLineWidth(context, 1.0/scale)).
    This methods works but... I have the deep feeling that it's not the best solution. Because if I zoom in a lot (like 10x), the curbe became darker (because the width becomes 1/10...)
    So, is it possible to keep the width of the Curve of 1px without modifying the width manually ? (like in the bloomberg application, for instance...)
    Thanks a lot for your tips !

    Since I see that nobody really seems understanding... my question can be summarized by this :
    Is it possible to define a curve width zoom independent ?

  • Iphone sdk custom pdf viewer in uiscrollview

    just like in the subject, I am struggling to get pdf view in uiscrollview.
    now, first of all - I know I can do it with UIWebView. I am doing so now, but next version of my app - I need to gain much more control, hence need for doing it like that.
    I hope one day, apple will create example of quartz vector graphics inside uiscrollview.
    now, to the point.
    basicaly got two methods:
    - (void)renderZoomToBitmap
    int w,h;
    NSDate *start;
    NSTimeInterval elapsed;
    start = [NSDate date];
    CGPDFPageRef pageref = CGPDFDocumentGetPage(pdf, _page);
    CGRect mediaBox = CGPDFPageGetBoxRect(pageref, kCGPDFMediaBox);
    mediaBox.size.width *= zoomf;
    mediaBox.size.height *= zoomf;
    w = mediaBox.size.width+0.5;
    h = mediaBox.size.height+0.5;
    CGRect viewBounds=CGRectMake(0,0,w,h);
    char *renderBuff = malloc( w * h * 4 );
    CGContextRef cgContext = CGBitmapContextCreate(renderBuff, w, h, 8, w * 4, CGColorSpaceCreateDeviceRGB(), kCGBitmapByteOrder32Host | kCGImageAlphaNoneSkipLast);
    CGContextSetRGBFillColor(cgContext, 0.1, 0.1, 0.1, 1);
    CGContextFillRect( cgContext, viewBounds );
    CGContextDrawPDFPage(cgContext, pageref);
    CGContextFlush( cgContext );
    renderPage = CGBitmapContextCreateImage(cgContext);
    free(renderBuff);
    CGContextRelease(cgContext);
    elapsed = [start timeIntervalSinceNow] * -1.0;
    // NSLog(@"view bounds past zoom w:%f h:%f", b.size.width, b.size.height);
    self.frame = viewBounds;
    NSLog(@" renderZoomToBitmap zoom:%f took %f s", zoomf, elapsed );
    and one that draws actual bitmap
    - (void)drawRect:(CGRect)rect
    CGContextRef context = UIGraphicsGetCurrentContext();
    NSLog(@"draw rect %f %f %f %f", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);
    CGContextTranslateCTM(context, 0.0, rect.size.height);
    CGContextScaleCTM(context, 1, -1);
    CGContextTranslateCTM(context, -_offset.x, _offset.y);
    CGContextDrawImage(context, rect, renderPage);
    [self setNeedsDisplay];
    now everytime
    - (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale
    is called , I set new zoom scale (zoomf) in above UIView instance, and call first method - to refresh bitmap.
    it does work okay when zoomf=1.0, but when user starts zooming in/out, it does funky things.
    What is the problem , do any one of you fine folks know ? please help me out with this. I am very new to quartz.
    thanks.
    Message was edited by: gryzman

    anyone please?

  • UIScrollView - zooming a view hierarchy and resetting zoom

    Hi,
    I want to reset zooming in scrollViewDidEndZooming - meaning:
    - during zooming the zoom view content is changing as expected
    - as soon as the user has finished zooming, the zoom view content should resize to what it was before
    So in scrollViewDidEndZooming I resize the frame of my content view UIImageView:
    - (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale {
    CGRect rectMask = view.orgFrame;
    view.frame = rectMask;
    ...which works fine for the content view itself BUT NOT for its children which I added to it via addSubview.
    Why are the subviews zooming correctly during the user interaction but not reacting to the frame-reset?

    1. System Preferences/Universal Access: there you can turn on Zoom, which you can operate with the scroll wheel of your mouse.
    2. The Spellchecker uses whatever language you have selected for the system. Again, go to System Preferences/International/Language and do as it suggests: drag British English to the top.

  • UIScrollView strangeness

    I hope someone can help, I have been stuck for a few days on a UIScrollView Issue that I just can't seem to find.
    I have a TAB BAR app, where the first view is set as a ScrollView and it has an ImageView as a subview and an image defined. This is all set up in IB.
    The app properly launches, and I can scroll around the images. Great.
    So then I added zoom functionality, and it worked.. sort of.. The pinches do shrink or expand the image... However once the image is stretched or zoomed, I am no longer able to scroll.
    I worked around this first problem by implimenting the viewDidFinishZoom or whatever it is and explicitely reset the scrollview to the size of the image widht and hieght multiplied by the scalor. Not sure why I had to do this, as no other example of this required this, but it did get me over that hurdle for now.. so anyone who can explain that one I'd appreciate understand what is going on.
    So next was to add touch events, which I did, and are properly being passed to the controller.
    Now, I wanted the single tap to simple set the contentOffset to make the point touched the center of the view.. Great, got this working.
    The next thing was to make double tap, ZOOM TO SCALE 1.0 and place the point clicked in the center of the zoomed screen..
    Major problem... I've tried this using zoomToRect With proper values to the rect, I've tried just calling setZoomScale or whatever it is... And it doesn't work.. no matter what I do, every time I programatically touch the zoomScale value the underlying view triggers its contentMode setting and I wind up zooming to the 0,0 because I have it set to top left... If I change it, then its the center that zoomed to...
    How the heck do I just have it take the point clicked on and zoom and scale that point???
    I am beyond befuddled at this point.. any help would be appreciated.

    system is the most uncomfortable I've ever seen. where the interface so that I can pay for a month at any moment? apparently on my card does not have the money when the system took off payment. but then I should be able to pay at any time until the end of my subscription. now it has created me a second plan. I need to remove the new second plan and make the payment for the month of use!

  • IPhone uibutton on uiview in uiscrollview

    Hi,
    Having trouble getting a uibutton in a uiview inside a uiscrollview to activate. Adding the button is fine and if I add the button to the uiscrollview it will respond and call fine (push function see below), but if I add the button to the uiview (which I need it to do because I have to scale the uiview) the buttons no longer activate. The condensed code I'm using is
    for (i;i<checkker; i++) {
    int theXValue = [routeCoordX intValue];
    int theYValue = [routeCoordY intValue];
    CGRect frame = CGRectMake(theXValue, theYValue, 33.0, 33.0);
    UIButton *stopButton = [[UIButton alloc] initWithFrame:frame];
    [stopButton addTarget:self action:@selector(push:) forControlEvents:UIControlEventTouchUpInside];
    [myImageView addSubview: stopButton];
    [stopButton release];
    [myScrollView myImageView];
    [myImageView release];
    if I use
    [myScrollView addSubview: stopButton];
    instead of
    [myImageView addSubview: stopButton];
    the buttons work fine, but won't scale with uiview of course.
    I'm sure I'm missing something small, something about the addTarget??
    Thanks,
    Andrew

    Golden! Thanks, I thought I couldn't be that far off, adding
    myImageView.userInteractionEnabled = YES;
    fixed it.
    Much appreciated.
    Andrew

  • Print HTML Report.vi doesn't scale properly.

    LV 8.5.1, Report Generation Toolkit, XP.  Our application uses the Print HTML Report.vi to print an HTML report.
    We found that on some installations the resulting page does not scale properly.  Instead of being one page wide,
    the printout is about 1.5 pages wide (and proportionately longer), leading to our report being truncated.
    Tried different printers, different print drivers, no difference.
    Finally we noticed that the affected computers all had Internet Explorer 6 installed.  Updating to Internet
    Explorer 7 fixed the problem.  Don't know about IE8, I expect that will work as well.
    Hopefully this will help someone else who runs across this problem.  I couldn't find any reference to
    an IE > 6 dependency in the Report Generation Toolkit readme system requirement.
    Matt

    Hi Charlie,
    The layout option is not wired to anything in the Standard, HTML, Excel and Word Report, but it is used in the Quick Print default case.  The Help document for this VI mentions that the layout option is ignored on Standard and HTML Reports but does not mention the Excel or Word Reports.
    This was discovered a little while ago in this discussion forum.  And a report has be filed to R&D by Ben.
    Justin Parker
    National Instruments
    Product Support Engineer

  • In Illustrator CS5, how can I scale down the length of each line in a selection rather than the selection as a whole?

    For example, suppose that I have selected the three lines in the image A below.  From a right-click > Transform > Scale... > Uniform (70%), I can produce B.  However I would like to produce C, in which each line is scaled down by 70%.  (Of course, I could do this by selecting and scaling down each line individually.  However my images have thousands of lines, so an individual approach is not really feasible.)

    Go to Object > Transform > Transform Each, then in the Scale section set both Horizontal and Vertical to 70 %.
    Edit: Of course, you must first select the lines that you want to scale!

  • How to scale a JPanel?

    I have written an application which places JPanels on the screen inside another JPanel. I would like to scale what appears on the screen and have done this by changing the x, y, width and height values. However due to rounding if I scale up and down a lot I can get a slight change in relative values.
    Is there another simple way to scale a JPanel?

    I used a scalable panel in one of my programs. With no knowledge of coding layout managers, I used absolute positioning - the setBounds method the panel, and sub components.
    Using a separate object to handle the scaling (responded to mouse wheel events) it maintained a double value for the desired scale. When this was updated, it fired off an event to each scalable panel to inform of the change in scale.
    Each component had a default size and position. To calculate the new size/position, these values were multiplied by the scale and used, but NOT stored as the new default values..
    Just remember, when drawing the panel, resizing the components, etc, always calculate from the default size / position, not the current one. This way you can remove the chance of slight indiscretions.
    Hope this helps.

  • How do I know if my Edge Animate compositions will scale up or down to fit each mobile phone platform's resolution? iPhone 3s, 4, 4s, 5, and 5s all have different resolutions. Do I use .png or svg?

    I want to use Edge Animate to create native app in PhoneGap Build. How do I know if my Edge Animate compositions will scale up or down to fit each mobile phone platform's resolution? iPhone 3s, 4, 4s, 5, and 5s all have different resolutions. And do I use .png or svg?

    If you use responsive scaling it will definitely scale .
    For best practises regarding graphics refer
    Edge Animate Help | Best practices for graphics in Adobe Edge Animate

  • How do I scale an Edge Animate comp afterwards?

    Is it possible to scale an Edge Animate composition after you made it?
    I made a composition, but I want to rescale the whole thing. I can change the stage values, but still have to resize all the elements. First of all that's a lot of work when you have a lot of elements and second of all the elements don't always keep doing what they're supposed to do for some reason.

    moved to the DPS forum....

  • Newbie:  In printing dialog, "Scale to" size options are greyed out

    I am in the initial stages of figuring out how to use Aperture (v1.5). I am currently trying to make a 5x7 print of a photo.
    In the print dialog, "Scale to" 4x6, 5x7, 8x10 size options are greyed out (only "fit image" and "fill entire page" are available).
    I've tried searching through the forums, but to no avail...
    Thanks!

    Click the Arrange button on the toolbar and select the desired option.

  • Can I scale an oam file in Muse?

    It would seem not, as I can't do it.   If anyone knows, please reply.
    The pixel preview of an oam does not even match in Muse.  This makes it hard to place the animation with any accuracy.

    Thanks Darrell.
    I am still new to Edge. Can an Edge file be converted to a Symbol and that file placed and transformed (ie: scaled, rotated etc) in another
    Edge file?
    Let me know if there any links to learn about Symbols in Edge.
    On the off-chance that something obvious in the code below let me know. This is in the Edit HTML window in Muse:
    <iframe src="http://www.first-image.com/_anim/MSF_anim_Edge/index.html" width="600" height="600" scale="20%"  frameborder="0" scrolling="no">
    </iframe>
    I had tried the "scale="20%" but the size didn't change. It seems like a loop function should be able to be entered in code here too.
    Thanks, David

  • Correct idea to scale out testing environment and test service pack2 installation

    Hi
    I have a sharepoint 2010 farm it has one sharepoint server, one database server
    In one server  below services are running
    Central administration service
    SharePoint Server Search 
    User Profile Service 
    Microsoft SharePoint Foundation Web Application
    so i want to scale out this form  to
    1 application server
    1 web front end server
    1 Search server (index server)
    1 databse server
    here how i scale out to this form
    1)here how i move  sharepoint  server search service to new  index server and
    2) here how i move  Microsoft SharePoint Foundation Web Application to new webfront end server
    and in this single server  some web appllications are running also how i move these to new wf server
    i want to do like this  because i want to test service pack 2 installation, now  sharepoint version is : service pack1
    my actual production environment has
    2 application servers
    2 webfront end servers
    2 index servers
    1 databae server
    so this correct idea to scale out testing environment and test service pack2 installation
    adil

    Hi Adil,
    The link below describes how to scale SharePoint Web Front-End with only web applications and the search query server  out of one SharePoint server with all roles running.
    http://sharepointsolutions.com/sharepoint-help/blog/2011/02/how-to-scale-out-a-sharepoint-2010-farm-from-two-tier-to-three-tier-by-adding-a-dedicated-application-server/
    Now you have two SharePoint server with:
    Tier 1 – SharePoint Server dedicated as a Web Front-End (WFE) with only the web application(s) and the search query service running on it
    Tier 2 – SharePoint Server dedicated as an Application Server with all of the other service applications running on it, but no web applications or query service
    Tier 3 – SQL Server for the databases
    Then you would scale out WFE server with web applications from tier1. Now please install a new SharePoint server and join it to the existing farm and deploy it as Web Front Server. Enable the relevant services on Web Front servers per the topology picture
    below, and stop the services running on the old server.
    http://technet.microsoft.com/en-us/library/cc263044(v=office.14).aspx
    Regards
    Rebecca Tu
    TechNet Community Support

  • Scale out sharepoint server search to index server and Microsoft SharePoint Foundation Web Application to new server

    Hi
    in my single server these below service are running:
    SharePoint Server Search 
    User Profile Service 
    Microsoft SharePoint Foundation Web Application
    here how i scale out  Microsoft SharePoint Foundation Web Application  to another server
    and  SharePoint Server Search  to new index server.
    adil

    Check here to see how to add servers to the farm:
    http://technet.microsoft.com/en-us/library/cc261752(v=office.15).aspx
    What Inderjeet meant was that if you chose to install SharePoint as a single server instead of a complete farm, you won't be able to add servers to the farm at a later time. You can check if this is the case by checking the registry key he mentioned. If
    that is indeed the case, there's nothing to it but reinstall the farm.
    So that is why you never should choose the single server option, it locks you in and limits future options, while choosing to install sharepoint as a complete farm it's still perfectly acceptable to host it on a single server.
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

Maybe you are looking for

  • My iPod doesn't know video from songs

    Suddenly, out of nothing, my 60Gb iPod with video forgot what is video and what is song. I used to have video lists and song lists. Now, they're all mixed up together in both sections. And it stopped playing videos. It thinks they're songs. It's very

  • Please HELP me with getting the right version of Adventure Works database

    Hi, I have SQL SERVER 2008 R2 installed with me. And i have downloaded 'AdventureWorks2008R2_Database' from msdn links only. It is running fine.  Now the practise material i have with me is where employee table have columns precisely as in this link

  • Adapter Specific Paramters for Integration Process in Configuration

    I want to send the data from flat file to idoc through BPM While doing configuration do I need to explicitly give Adapter specific parameters(Logical System Name) for BPM(Integration Process) or not? Is it mandatory to give Adapter Specific Parameter

  • Ical wont sync

    So I noticed recently that even though I'm updating iCal with new events, they aren't transfering over to my phone. I've tried resetting isync, basically everything short of a restore. I've looked but can't find anything quite like this. Anyone have

  • Setting the filter to restrict the data based on processing period

    Hi all, Hope someone might be able to help me - OBIEE 11.1.1.5 - I have an RPD very simple just two tables (nothing coomplex). Here is the scenario - after every month end close the user will run the report from the dashboard by selecting the process