Search Results

Search found 16 results on 1 pages for 'igul222'.

Page 1/1 | 1 

  • UIScrollView subviews not showing at first

    - by igul222
    I created a custom UIScrollView subclass that works a like a UITableView, keeping a collection of subviews and re-using them whenever the user scrolls. It's implemented like this: -(void)layoutSubviews { for(UIView *subview in [self subviews]) [subview removeFromSuperview]; // then re-add subviews after changing the frame and some attributes } This works fine with simple UIViews, but when I try to do it with a UIView that has a UILabel subview, the "base" view appears fine, but the UILabel doesn't show up at all. I can get the UILabel to show up by scrolling the entire UIView off screen and then bringing it back on. What could be causing this? So far, I've tried calling [myUIView setNeedsLayout], [myUIView setNeedsDisplay], and [myUIView layoutIfNeeded] from various places. None of them worked, and the last one crashed my app. I've also done the same thing to myUIScrollViewSubclass, with similar results.

    Read the article

  • iPhone/iPad SDK: homescreen/Photos style grid view?

    - by igul222
    I'm building an iPad app, and would like to use a "tiled" display with objects arranged in a grid, similar to the iPhone/iPad home screen and the iPad photos app. More examples of this interface: http://itunes.apple.com/us/app/flipside-hd/id364916273?mt=8 http://itunes.apple.com/us/app/evernote/id281796108?mt=8 Is there any pre-built way in the SDK to do this? If not, how should I go about creating my own?

    Read the article

  • Darkening a UIView

    - by igul222
    I'd like to "darken" a UIView by a certain amount. Right now, I'm doing the darkening like this: UIView *overlay = [[UIView alloc] initWithFrame:mainView.bounds]; overlay.backgroundColor = [UIColor blackColor]; overlay.alpha = 0.5f; [mainView addSubview:overlay]; Unfortunately, this also adds a semi-transparent black overlay to parts of mainView that are transparent. Is there any way to only darken the non-transparent sections?

    Read the article

  • UIView "suck" animation

    - by igul222
    I'd like to use the UIView "sucking" transition (view is "sucked" into a point) referenced here: http://iphonedevwiki.net/index.php/UIViewAnimationState#Using_suckEffect The method above, however, uses private APIs, which makes it next to useless for an App Store app. How can I recreate a similar effect without relying on private APIs? I'm guessing the answer has to do with OpenGL, although I have zero experience there.

    Read the article

  • Obj-C memory management: why doesn't this work?

    - by igul222
    Why doesn't the following code work? MyViewController *viewController = [[MyViewController alloc] init]; [myWindow addSubview:viewController.view]; [viewController release]; As I understand, myWindow should be retaining viewController.view for as long as the window needs it. So why does this cause my app to crash on launch? (commenting out the last line fixes the problem, as expected)

    Read the article

  • UITableView in popover doesn't stop scrolling

    - by igul222
    I have a UITableView being shown in a popover. One cell in my table view has a UITextField in it. When the text field is being edited (the keyboard is visible) and I rotate the device from portrait to landscape and then try to scroll the table view, it keeps going past its bounds, instead of stopping and "bouncing". Does anyone know how to fix this?

    Read the article

  • C: do {...} while(0)?

    - by igul222
    I'm working on some C code filled with macros like this: #define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0) Can anyone explain what this macro does, and why do {} while(0) is needed? Wouldn't that just execute the code once?

    Read the article

  • Using Ruby/Python code in an iPhone OS app?

    - by igul222
    My app needs to use a library which is only available for Python and Ruby. From my understanding, Apple allows Ruby to run on iPhone as long as users can't execute arbitrary code (Rhomobile uses Ruby). How can I bundle Ruby/Python with my app, call a function from my Obj-C code, and get the result (a string) back in C or Obj-C format?

    Read the article

  • How to safely let users run arbitrary Ruby code?

    - by igul222
    I realize this sounds a little crazy, but I'm working on a project for which I need a server to run user-provided Ruby code and return the result. I'm looking to prevent something like this: system("rm -rf /") eval("something_evil") # etc... I'm sure there must be some reasonably safe way to do this, as it already exists at places like tryruby.org. Any help is greatly appreciated, thanks!

    Read the article

  • Swing: set JFrame content area size

    - by igul222
    I'm trying to make a JFrame with a usable content area of exactly 500x500. If I do this... public MyFrame() { super("Hello, world!"); setSize(500,500); } ... I get a window whose full size is 500x500, including the title bar, etc., where I really need a window whose size is something like 504x520 to account for the window border and titlebar. How can I achieve this?

    Read the article

1