Related to iPhone apps

can anyone tell how to flip an image or a view from bottom to top vertically (not curlup) in iPhone/iPad app developement.
thanks
devendra kumar singh.

Hello Devendra, I have used this code in the past and kept it as a "snipet" for future use
Dont forget to add -(UIImage*)rotate:(UIImageOrientation)orient to your .h file and thanks to [this|http://www.platinumball.net/blog/2010/01/31/iphone-uiimage-rotation-and-scaling/] blog for the code.
-(UIImage*)rotate:(UIImageOrientation)orient
    CGRect             bnds = CGRectZero;
    UIImage*           copy = nil;
    CGContextRef       ctxt = nil;
    CGRect             rect = CGRectZero;
    CGAffineTransform  tran = CGAffineTransformIdentity;
    bnds.size = self.size;
    rect.size = self.size;
    switch (orient)
        case UIImageOrientationUp:
        return self;
        case UIImageOrientationUpMirrored:
        tran = CGAffineTransformMakeTranslation(rect.size.width, 0.0);
        tran = CGAffineTransformScale(tran, -1.0, 1.0);
        break;
        case UIImageOrientationDown:
        tran = CGAffineTransformMakeTranslation(rect.size.width,
         rect.size.height);
        tran = CGAffineTransformRotate(tran, degreesToRadians(180.0));
        break;
        case UIImageOrientationDownMirrored:
        tran = CGAffineTransformMakeTranslation(0.0, rect.size.height);
        tran = CGAffineTransformScale(tran, 1.0, -1.0);
        break;
        case UIImageOrientationLeft:
        bnds.size = swapWidthAndHeight(bnds.size);
        tran = CGAffineTransformMakeTranslation(0.0, rect.size.width);
        tran = CGAffineTransformRotate(tran, degreesToRadians(-90.0));
        break;
        case UIImageOrientationLeftMirrored:
        bnds.size = swapWidthAndHeight(bnds.size);
        tran = CGAffineTransformMakeTranslation(rect.size.height,
         rect.size.width);
        tran = CGAffineTransformScale(tran, -1.0, 1.0);
        tran = CGAffineTransformRotate(tran, degreesToRadians(-90.0));
        break;
        case UIImageOrientationRight:
        bnds.size = swapWidthAndHeight(bnds.size);
        tran = CGAffineTransformMakeTranslation(rect.size.height, 0.0);
        tran = CGAffineTransformRotate(tran, degreesToRadians(90.0));
        break;
        case UIImageOrientationRightMirrored:
        bnds.size = swapWidthAndHeight(bnds.size);
        tran = CGAffineTransformMakeScale(-1.0, 1.0);
        tran = CGAffineTransformRotate(tran, degreesToRadians(90.0));
        break;
        default:
        // orientation value supplied is invalid
        assert(false);
        return nil;
    UIGraphicsBeginImageContext(bnds.size);
    ctxt = UIGraphicsGetCurrentContext();
    switch (orient)
        case UIImageOrientationLeft:
        case UIImageOrientationLeftMirrored:
        case UIImageOrientationRight:
        case UIImageOrientationRightMirrored:
        CGContextScaleCTM(ctxt, -1.0, 1.0);
        CGContextTranslateCTM(ctxt, -rect.size.height, 0.0);
        break;
        default:
        CGContextScaleCTM(ctxt, 1.0, -1.0);
        CGContextTranslateCTM(ctxt, 0.0, -rect.size.height);
        break;
    CGContextConcatCTM(ctxt, tran);
    CGContextDrawImage(ctxt, rect, self.CGImage);
    copy = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return copy;
Edited by: Paul Aschmann on Oct 25, 2011 1:40 AM

Similar Messages

  • Can i use APNS certificates created by the "Apple push certificates portal" to send regular push notifications to my iphone app (not MDM related)?

    Can i use APNS certificates created by the "Apple push certificates portal" to send regular push notifications to my iphone app (not MDM related)?
    The push notifications are sent from servers of my customers and i don't want to give them my own push cert (with the private key)

    As KiltedTim mentioned you should be "good to go" in a couple weeks when IOS 8.0 is released to the public for your iPad.  Here's more info.  Scroll down to the "Send any kind of text message from any of your devices"  section:
    https://www.apple.com/ios/ios8/continuity/

  • TS4020 How can I locate my lost iPhone 5 with find my iPhone app ? Plus someone tried accessing my apple I'd on FaceTime on an unknown number related to iPhone 5 is this who's got my phone and can I track a number ?

    How can I locate my lost iPhone 5 with find my iPhone app ? Plus someone tried accessing my apple I'd on FaceTime on an unknown number related to iPhone 5 is this who's got my phone and can I track a number ?

    If you activated the Find My iPhone service (in Settings>icloud), and if the device's batteries still have a charge, the device is not turned off and has not been reset and is connected to wifi, then you can try to track it.  Using a computer's browser, log into icloud.com and look at the Find My iPhone page.  On a device, invoke the Find My iPhone app (get it for free at the itunes app store) and log into the icloud account.  Note:  The Find My iPhone **app** does not turn on the service, you can only do that through Settings>icloud.
    If the device is listed as "offline", then one of the requirements listed above is not met (like being connected to wifi, or if the device was stolen and the thief reset it).

  • Iphone app - vocabulary related

    Hi there, is anyone know any iphone app that i can "SAVE" my vocabulary?
    Thanks!

    If you go to play the song and you have the iPhone upright with the album art displayed... you click on the album art and you get the time controls at the top of the screen. On the left there is a button for repeat (looks like a race track) and on the right the button for shuffle (looks like an X). If it is white it is not set, if it is blue it is set. Make sure it's white.
    Also, anytime you upgrade your firmware it's a good idea to do both a reset and a full restore.

  • What is Apple doing to fix iPhone app failure

    This problem looks like a bad MS conflict error... One of the biggest reasons I got away from PC.
    I have a new (now 4 days old as of this posting) 3G iPhone with all updates. It has been registered with Apple and synced with my iTunes. I have loaded free apps on my iPhone with the reasoning being that if the free apps don't work, I surly will not buy an app from the designer of a non working free app.
    I have done the reset and reboot, which "some" of the apps did work fine. But all, non standard iPhone apps, crash on startup following a sync section with iTunes.
    Without claiming to be a programer or even a technician, it appears that the cause of the down loaded app failure stems from the sync with iTunes and maybe poor app design. Anyone from the PC world will recognize this as a "conflict error".
    At the iPhone introduction Keynote address, I feel Steve Jobs lead me to believe that is would not happen with the 3rd party development of apps. It's just not the "Apple" way. I maybe wrong in that it is not an actual "conflict error" but something else, still, it is not what I have come to expect from Apple and hope that this problem is not a sign of the future with Apple. It also appears that better "quality assurance" is needed with app development and iPhone syncing.
    My question is:
    What, if anything, is Apple doing to solve this massive problem with downloaded apps and the iPhone and syncing with iTunes?
    If someone could show me a link with an Apple reply to solving this problem besides reset/reboot/reload I would be a little more confident in knowing that I didn't waste good money and "TIME" in getting the iPhone.
    This boot-reboot, reset, wipe it clean approach is not good, to much like living in the MS world, not Apple.

    Going to the local Apple store this morning...
    My problem is not uncommon as the board is showing signs of this happening to many others as well. That is where I found the restore and reboot information to try to solve the issue of crashing apps.
    I understand that Apple will not "give away the cow", but letting iPhone users know that the problems they are having are being addressed by Apple is a little more comforting than nothing at all. Other wise, all the apps in world are useless and even more importantly worthless, if a person has to reset/reboot/reload just to get them to work.
    IF Apple can not address the basic problems with todays iPhone apps, why should one believe that the iPhone 3.0 OS is any better? Using a PC comparison, which is better, XP or Vista. If the current iPhone OS of 2.2. what ever is not working that well (as related to down loaded apps and iTunes), will OS 3.0 be any better?
    The waste of time I refer to is in going to the apps store and downloading the apps... Again why by apps if the free version does not work?

  • Used "find my iphone app" and now that I have found my iphone, no one can hear me talk? how do I let Apple know I have found my Iphone so I can use my Iphone?

    used "find my iphone app" and now that I have found my iphone, no one can hear me talk? how do I let Apple know I have found my Iphone so I can use my Iphone?
    so frustrated.

    Well its defintiely nothing that Apple can activate to fix this. They would be able to troubleshoot with you though. This may be able to be resolved if its something software related.
    You can chat into Apple by visiting https://getsupport.apple.com

  • Is an iPhone app the best choice for our project?

    Dear All,
    We are developing a travel tour idea for different locations within the US.  Tour content can include video, audio, images and text, as well as maps and locations.  We want to make our tours "in-depth" so that people can spend good quality time traveling a short distance and exploring "in-depth" rather than travelling long distances and giving only casual interest to what they see.
    I'm new to developing apps for the iPhone and am using Dreamweaver CS5.5 soon to be updated to CS6. 
    I'm wondering if an app for iPhone and other related media like Android is really the way to go because of the limited content and screen size available.  I can envision our tours being utilized in many other formats, including iPad, Interactive PDF, as travel e-books or through an interactive website.  Our goal is to sell our apps, not give our material away for free. PDF would be my preferred format, but I know that PDF is easily transferred for free among users and would probably not give us much profit.
    Any thoughts out there on what the best format for our project might be, or should it include ALL of the above formats? App creation for the iPhone is a rather complicated process, so that's why I'm wondering if after all of the work that you have to put in to create an iPhone app, if that is ultimately my best choice.
    I would appreciate any thoughts or advice, or any questions you might have.  I'm working on a Mac Pro with CS5.5 Master Collection soon to be updated to CS6
    Small Town Gal

    hi,
    It depends on your requirement. Base on my experience, VM or website all could meet your requirement. From your description, You could use azure website to host your php website (http://www.windowsazure.com/en-us/documentation/articles/web-sites-php-configure/).
    And you could use website auto scale feature in the future. I suggest you could see their comparison (http://www.windowsazure.com/en-us/documentation/articles/choose-web-site-cloud-service-vm/
    Hope it helps.
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Email errors from within 2 iphone apps

    New occurrence, now in two different iPhone apps: twitter and 2do
    trying to send email related to content from within the app.  getting this error code (see attached screen shot from within 2do)
    if I were just getting this message from within one app, I'd of course suspect the app, not the iphone.  But now that I'm encountering it in two apps, and twitter to boot!), I'm suspicious this goes deeper than the apps
    any guesses?
    many thanks

    Apple will likely never see your wishes unless you post them here:
    http://www.apple.com/feedback/iphone.html

  • Need to restore iphone5 but screen broke and find my iphone app active but no device registered

    My iphone5 screen recently stopped working (1 year and 3 wks after warranty expired!) and kinda froze so the screen sensor is disabled and is not swiping. Cant answers calls or access anything othe rthan commands via Siri and bluetooth incar/ headphones to play music and make calls.... My network provider advised me to back up and completely restore.  When trying to restore via itunes it asks me to deactivate find my iphone app in settings.  Trouble is i cannot access this due to broken screen/sensor... my phone has its passlock on also so siri will not open settings unless i touchscreen in my pin.
    using my sons phone i tried to locate my phone using the app  find my iphone but it said i was 'offline'  i accidently ended up removing the device from my account (happy clicking) and now icloud.com states no device registered. Grrrrrrrr  and now i can only register device by changing settings on the phone itself.
    I cannot access my phone to change setting so cannot restore. how can i restore factory settings? or even completely deactivate/remove find my phone app.. I tried to delete it from itunes but it still shows im still active but with no device registerd.  i am not sure if its something to do with icloud settings? im not that clued up with iphones despite being an apple customer for  5 years!  
    can anyone suggest an alternative to restore the phone (in hope the screen will work) though i have read other posts and i dont have the random screen freeze... which is related to ios 7 upgrade... but it is permanent.  I reckon I will need Apple to fix the sensory mechanisms inside
    please help as i am having to use a really rubbish smart phone...

    Thanks diesel vdub for your suggestion.... :-) I managed dfu mode which allowed me to reset to factory settings though the screen was still broke. Think I need replacement screen/sensor. No doubt cost me a small foutune to fix!
    Cheers anyway. I hope it works for others with similar problem.

  • For iOS the ipad version shows the folio that has been published, but the iPhone app is not.

    I am responsible for handling the apps and not at all involved with or know how the folio creation process works.
    When I build the app for iOS the iPad version shows the folio that has been published, but the iPhone app is not showing the folio.
    Is this something related to the build process or how the folio was created?
    The folio also shows up in the Android app (at least the phone I have tested with).
    Thanks,

    "Android and iOS viewers have different requirements for displaying folios. Any folio size you create can appear in an Android viewer. The articles are scaled and letterboxed as needed. However, on the iPad, the viewer displays only folios with a 4:3 aspect ratio. The iPhone viewer displays only folios with a 3:2 or 16:9 (1136x640) aspect ratio."
    Here is the entire post if you'd like to read more: Digital Publishing Suite Help | Creating documents for multiple devices

  • Countdown iPhone app similar to countdown widget?

    Hello all,
    Our client has approached us to develop an iPhone app similar to the widget we just did, counting down the days/hrs/mins to a big meeting in October.
    The widget was obviously dead easy, as we used the template that Apple so kindly provides.
    Is there a similar template available for the iPhone, or could anyone point me in the right direction for creating something which at least seems relatively simple? But I'm a little stumped as to where to start. Any help getting started would be greatly appreciated.
    Thanks!

    Hi Sub - There's no template that makes a countdown clock, nor can I think of an Apple sample app that's directly related. The DateCell sample might my helpful. Though it doesn't build a countdown clock, it shows how to use several of the classes that could be used in your project.
    To find samples of countdown and alarm clock code, try a web search on keys like 'sdk iphone countdown clock sample code'.
    As you'll gather from blogs and forum posts on this subject, you'll have a problem to solve if your client expects some alarm or notification when the zero hour approaches. Legal third party iPhone apps can't run in the background. So unless your app happens to be active when an alarm is needed, there's no way for the app to directly alert the user. The closest you can get to that is by using the new "PUSH" features. So there's another key word you might want to search on.
    We might be able to help you more if you post more details about what your client expects the app to do, and what kind of UI you're planning. For instance, the sample at the above link shows how to use UIDatePicker as a calendar. UIDatePicker also includes a countdown mode that would be one way to anchor the UI without making your own shot clock.
    If you want to post more details, please also include your skill level. E.g. whether you've ever built an iPhone app. Be sure to also let us know if you'll need to use PUSH, or any other feature that would require communication with a server.
    Btw, does your client understand that the only legal way to distribute an iPhone app is by having it accepted for sale in the iTunes store? Several developers here have had to explain this to clients who want a private app which is only distributed to customers or employees.
    So there's an overview of things to consider. There's probably going to be lots more to your project than just coding a UI with a countdown clock. But we can certainly help you with that part as soon as we know what that UI should look like.
    \- Ray

  • WiFi List on iPhone App

    Hello,
    Can we show available wifi networks on my iphone app.Can anyone tell me with related code
    Thanks and Regards
    Sudha Patil

    No, I didn't.
    I did not know there was an option for the iPhone until now. Thank you.
    Please would you mind answering the following questions then:
    - What's the best way (fastest way) to change my iPad designs to the iPhone design? (copy and paste, then resize?)
    - Does the iPhone option work for both iPhone 4 and iPhone 5?
    thank you very much.

  • IPhone Apps Deployment

    Dear all,
    I need some informatin regarding to the deployment of the iPhone Apps. Thanks for your time and sharing any kind of related info.
    As a software vendor, our company is to develop an iPhone App for a number of different clients (other organizations). What kind of program should our company engage, iOS Developer Enterprise Program or iOS Developer Program? We don't like to distribute the app through the App Store and we don't like to wait for review and approval in the time of urgency.
    Let's say if it is OK for us to distribute through App Store waiting the review and approval as needed, will there be any difference? What are the must-have apparatus (hardware and software) that we should have (e.g MacBook, xCode)? Is there any link that we can get the information concise and clear?
    Thanks for your kind attention.
    Best regards,
    Zaw Min Tun

    robbie. wrote:
    I know that, but the iPad still has more pixels, and has room to run it at 960 by 640. But instead, it will run it at 480 by 320 just stretched to 960 by 640. So it is running at half the detail it could be running at.
    Because the Apple software in the iPad doesn't allow it. The 'iphone app in a window' is as it is until Apple changes it. A developers only recourse is to recode the display routines for the iPad and while many have done so a larger number have not.

  • WARNING WARNING IPHONE APP " BLACKLIST"

    To all. This is a warning. My wife and I downloaded the app "blacklist" being advised from ATT after receiving numerous telemarketer phonecalls.
    This app has corrupted my mobile me contacts account , my address book on my macbook pro and the sync services protocol in mobile me.My computer is ultra slow the beachball is constantly spinning and I have to restart my computer all the time.
    I have had 2 separate meetings wuth my genius bar and have been on the phone with the mobile me help desk for 4 hours still ongoing. The mobile me guy is currently conferring with engineering on the issue
    Whatever you do , do not download this app to your iphone.
    Jesper

    Some exemples of people that sued Apple independently of agreements including cases related to the App store, in some cases people got a settlement of some kind, Others are waiting for the outcome,
    I am not saying that they are right to sue in most cases, I am just saying that we have the right to fight for our rights as a consumer and the legal system is here for that.
    In the end, I always can take my money elsewhere.
    http://www.pcmag.com/article2/0,2817,2384301,00.asp
    http://www.pcmag.com/article2/0,2817,2372127,00.asp
    http://www.pcmag.com/article2/0,2817,2365940,00.asp
    http://www.pcmag.com/article2/0,2817,2372127,00.asp
    http://www.pcmag.com/article2/0,2817,2349421,00.asp
    http://www.pcmag.com/article2/0,2817,2367089,00.asp
    http://www.pcmag.com/article2/0,2817,1880615,00.asp
    http://www.pcmag.com/article2/0,2817,2383641,00.asp

  • Recently my phone updated itself to ios 7, it wont let me sign into my iphone app store to download apps,i click on an app i want it just clicks but doesn't start to download  any help?

    recently my phone updated to ios 7, it wont let me sign into my iphone app store to download apps,i click on an app i want and it just clicks but doesn't start to download, i can see thats its not signed in so i tried to re set up my account under the app store in settings , but its just a grey area and wont let me click to input any information. this happened right after i updated my phone, any help?

    Hi SarahHannah,
    If you are having trouble activating iMessage, this article contains relevant troubleshooting steps:
    iOS: Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/ts4268
    Take care,
    - Ari

Maybe you are looking for

  • Container Operation not working properly

    Hi, In my workflow,  container operation is not working properly sometime. I am assigning agents from class attribute to workflow container . sometime the value is not correct. scenario: class attribute - WFAGENT - value USABC workflow container: WFA

  • Barcode in pdf form, acroform

    This is my question on the barcode, we are using a barcode font with start and end point charachters. However in case of a full name how to count for space between last name and first name. We also know that special charachters can be used in place o

  • Can't get the Submit button to work on Acrobat X

    I was having this problem on Acrobat 9 and so I bit the bullet and upgraded, hoping the problem would go away, but it did not. I have a simple form for an event which recipients will fill out and submit, emailing the entirePDF to others (not to me) I

  • Launchpad layout resetted after installing Netgear Genie. How to undo?

    After installing netgear genie my launchpad layout got resetted as if you buy a new mac, with on the other pages all other applications sorted by name. Really annoying. Cant find the .app of the genie app, the app isnt in the applications folder, now

  • Method-level Locking

    (Here's another one): I'm unable to find a way to enable method-level locking in WebLogic. This kind of lock has the same semantics as a simple "synchronized" on the method level (which you cannot write as a bean developer). The advantage is that you