Search Results

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

Page 1/1 | 1 

  • iPhone file corruption

    - by sfider
    Is it possible (on iPhone/iPod Touch) for a file written like this: if (FILE* file = fopen(filename, "wb")) { fwrite(buf, buf_size, 1, file); fclose(file); } to get corrupted, e.g. when app is forced to terminate? From what I know fwrite should be an atomic operation, so when I write whole file with one instruction no corruption should occure. I could not find any information on the net that would say otherwise.

    Read the article

  • OpenGL ES, UIView and Status Bar mess

    - by sfider
    I have iPhone (iPhoneOS 3.x) OpenGL ES app that: can be in landscape/portrait orientation can be with/without status bar shown I do this by changing status bar orientation and hidden state, then updating OpenGL view frame so it won't overlap status bar and setting projection matrix appropriately. OpenGL view is in portrait orientation at all time. View controller's shouldAutorotateToInterfaceOrientation: method returns false always, so the status bar won't start autorotating when app is in landscape mode. The problem I have is that I want to use some other UIViews, like: UIWebView, MFMailComposeView, MPMediaPicker. I could show them as modals, but this this have some drawbacks: views will always show in portrait orientation, even if they support landscape orientation views will not autorotate, even if they support it What I do is I take OpenGL view of the window with removeFromSuperview, set transform to the other view so it will be in portrait/landscape orientation when it shows up and place the other view on the window with addSubview:. This works fine without the status bar, but with it there are some problems I cannot work out: MPMediaPicker is sized to fit under status bar, but it slides under it anyway MFMailComposeView does not show navigation bar until it autorotates on device orientation change Does anyone has an idea how can I get it to work?

    Read the article

  • iPhone status bar orientation with opengl

    - by sfider
    I have opengl only view that displays in portrait and landscape mode using projection matrix (view's transformation is identity all the time). I need to show status bar with proper orientation. I do this by setting status bar orientation property in UIApplication and changing frame of opengl view so the view won't go under status bar. When I change from landscape to portrait (landscape is the initial state) view's frame is set to (0, 20, 320, 460) and stays like this. However view appears to be translated by (-10, -10). It seems that I did change the size of view but couldn't move it. Weird things are: initialy view is full screen, I change it to (0, 0, 300, 480) (landscape with status bar) and it works then, it doesn't work when I try to chenge it for the second time (portrait with status bar) frame property of the view shows that view is placed correctly Any thoughts on what can by the problem?

    Read the article

1