uikit

Remove rows from tableview based on IBAction

I have a segmented control on the top of a tableView that I would like to change the data that is loaded into the table. The segmented control has a button for day, week, month, year. If you click on one of the buttons it should only display that table data for the appropriate time period. This works fine right now when I move across t...

Does UIWebView has problems with .aspx-requests and link- / phonenumber-detection?

I've encountered a strange problem, when it comes to displaying a page in a UIWebView on iPhone SDK 4.0. I load a page with a .aspx-request and receive completely valid html-sourcecode. Inside the html is an email-address linked like this: <a href="mailto:[email protected]">[email protected]</a><br /> When I activate the link-detection in the...

How do you animate the layout of the UI elements in a custom view of an iOS app?

I'd like to build a preferences screen in my iOS app that has a segmented control at the top and, depending on its state, it will determine which sliders and switches are visible, as well as where they're positioned. When you change the state of the segmented control and the layout of the screen changes, I'd like it to animate smoothly ...

how do i get the location of a touch in cocoa/objective-c?

I am looking to get the location of a touch, preferably corresponding to the pixels of the screen. I'm new to objective-c and cocoa and haven't been able to find anything on the web about this so i'm not sure if there is even a way to do it. any ideas or direction of where to look would be really helpful. thanks. ...

What could be wrong with my CGBitmapContextCreateImage() or UIGraphicsGetImageFromCurrentContext() call?

Same problem as this guy I'm trying to use CGBitmapContextCreateImage() or UIGraphicsGetImageFromCurrentContext(), but they leak badly, even if I don't do anything in the context. When I run this in a UIView subclass, before setNeedsDisplay: UIGraphicsBeginImageContext(CGSizeMake(320, 264)); // Optional drawing code here, but still lea...

Does releasing a UIView release all its subviews?

If I have a UIView, and I add an allocated subview into it (in this case the UIImageView), when I release the UIView, will UIImageView also be released? I set up my view and a subview like this: UIView *view=[[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]; UIImage *myImage=[UIImage imageNamed:@"image.png"]; // This is the su...

UIKit controls for a sudoku grid?

I've recently completed an algorithmic sudoku solver in C, one in which three different approaches are taken to solve the puzzle. It was a piece of code I wrote for a Project Euler solution. Quite a bit of fun, I might add... Anywho, so I'm really interested in getting this little solver into an iPhone app. I really am at a loss for wha...

UIScrollView doesn't scroll

Hi. I have a problem with a UIScrollView. I set its frame.size, contentSize (bigger then frame), but I still can't scroll. My program has sctucrure like this: MainMenuViewController -> ScrollBarController -> UIScrollView This is a part of MainMenuViewController's method viewDidLoad ScrollBarController *imgScrollBarCtrl = [[ScrollBarC...

UIDatePicker select Month and Year

I need a UIDatePicker for selecting Month and Year only. I checked the class reference documents. Looks like UIDatePicker is a UIView. I imagined UIPickerView may be a sub view and I can hide the component if I can grab it. But no. That was not possible. Do I have to create my own custom picker then? Any ideas? ...

How do I hide the textfield cursor on the iPhone when keyboard is active.

we are trying this for password settings,so that cursor should not be visible to user. ...

Is this a sensible app design?

Hi. After much reading and many tutorials I'm now attempting to write my first iPhone app, but already starting to run into complications so want to go back to basics and ask whether I've got the fundamental UI design correct: MainWindow.xib has a TabBarController. The TabBarController contains 3 NavigationControllers, each containing ...

Showing UIBezierPath on view

In one of my methods i have this code: -(void)myMethod { UIBezierPath *circle = [UIBezierPath bezierPathWithOvalInRect:CGRectMake(75, 100, 200, 200)]; } How do i get it to show on the view? I tried addSubview but it gave me an incompatible type error because its expecting a UIView. I'm sure this must ...

Windows Form or WPF, to code or not code

I am planning to develop a UI control suite (open source) on .net because there is hardly such things as free or open source out in the market. But I am not really able to decide the following factors before going into design phase: Should I write it for Winforms only? Should I write it for WPF only? Or, should I write it for both? ...

Taking a Screenshot of an iPhone app mixing UIKit and OpenGL

So, I know how to take a screenshot with UIKit: UIWindow *window = [[[UIApplication sharedApplication] delegate] window]; UIGraphicsBeginImageContext(window.bounds.size); [window.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); UIImageWriteTo...

UIImagePickerController console message

Hi All, I am using UIImagePickerController for selecting images from the photo library. But I am getting a message on the console saying "Using two-stage rotation animation. To use the smoother single-stage animation, this application must remove two-stage method implementations." What is this due to ? Thanks ...

Problem with popover overlaying some of my component

Hello, I'm using a popover to display information about the object the user clicked on. The problem is that sometimes this popover goes on top of a graphical component that need to stay visible. The solution would be to tell my UIPopverController to be displayed strictly inside a specific zone even if the anchor point is at the border...

Aliasing issue with PDF inside UIScrollView

I have a UIView subclass which displays a PDF, and this is embedded in a UIScrollView. When the user zooms in, the PDF content is pixelated. I've double checked, and anti-aliasing is enabled. If I display the PDF at a larger size using CGContextScaleCTM, it displays fine, but I don't know how to integrate this with the UIScrollView zo...

Problem with Font in iPad application

Hello, In a UIWebView of my iPad application, I display a HTML file with a Cambria font (the font type is set in a css file). This font is not supposed to work on iPad but the font that appeared seemed nice to me. Now I'm trying to use the same font in the rest of my application and I discovered that Cambria font is not available on iP...

How does - (CGRect)convertRect:(CGRect)rect toView:(UIView *)view work.

I've been using that kind of methods on and off but never really understood how they behaved. Every time I try to use them, I find myself poking in the dark as I try different aspect and it never seem to do what I expect it to. For the sake of argument, I'm trying to convert the frame I get from UIKeyboard's notification. In landscape...

On iPhone, do I need to account for the 20px of the top status bar?

On iPhone, when adding a subview to the window view manually, do I need to account myself for the 20px of the top status bar? That is, do I need to create views with a frame set to (0, 20, 320, 460): UIView *myView = [[UIView alloc] initWithFrame:CGRectMake(0, 20, 320, 460)]; [window addSubview:myView]; If so, are there some official ...