Search Results

Search found 3 results on 1 pages for 'cruinh'.

Page 1/1 | 1 

  • iPhone UI layout debugging

    - by Cruinh
    I have this chronic issue with iPhone UI development where views sometimes seem to appear on the screen in a location different than what is reported by their frame property. Here is what I am doing to try to debug the issue: UIView *currentView = self.view; while (currentView!=nil) { NSLog(@"frame: %f,%f,%f,%f", currentView.frame.origin.x, currentView.frame.origin.y, currentView.frame.size.width, currentView.frame.size.height); currentView = currentView.superview; } I expect this should show me the coordinates and size of each element up the hierarchy from the given view to the app's root UIWindow element, with the coordinates for each element relative to its parent. However, that does not seem to be the case. In my current situation, I have a UI I'm trying to debug where every other time I rotate the device, the whole UI shifts up or down 20 pixels, yet the code block above reports exactly the same numbers every time. I tried calling the above code after as much as a second delay, but that the numbers still come out the same each time. Does anyone know a better way to inspect the screen coordinates of UI elements? If I can detect when one is wrong, I can compensate for the problem when it appears.

    Read the article

  • iPhone StoreKit development: Can't create a test user?

    - by Cruinh
    I'm trying to get up to speed on how to develop an in-app store using the new 3.0 SDK... but I'm a bit stuck in that I don't seem to be able to create a test account. The iTunes Connect FAQ states "To create test users for your sandbox environment, go to the Manage Users section of iTunes Connect and select In App Purchase Test User. Your test users will not have iTunes Connect access. They will just have access to the sandbox environment." ...but when I go to that Manage Users section, there's no mention of any sort of "In App Purschase Test User" or how to make one. Did I miss doing something to enable that? There is another section of that same FAQ that seems to suggest I need to have a paid app in the store first? Is that the reason I can't even use the test environment?

    Read the article

  • Return HTML from a user selection

    - by Cruinh
    I have the following, very simple html page... <html> <head> <script type="text/javascript"> function alertSelection() { var selection = window.getSelection(); var txt = selection.toString(); alert(txt); } </script> </head> <body> This is <span style="background-color:black;color:white">the</span> text. <div style="background-color:green;width:30px;height:30px;margin:30px" onmouseover="alertSelection()"> </body> </html> When I select the entire first line and mouseover the square, I get an alert with "This is the text.". How would I fix this so the the span tag or any other selected HTML isn't stripped out of the alert message?

    Read the article

1