I've been looking at the way resiznig works in Cocoa Touch and it looks like without writing any code, a UIView cannot be set up to size itself based on the size of it's children. There are plenty of options to resize and re-position child views when their containing view changes size, but nothing that works the other way round as far as...
ok, here goes....
When you gesture right or left on the iPhone home screen to access your pages of applications, you get a seamless transition between the current page of apps and the next one you're moving to.
I'd like to be able to create the feel of UIViews being almost 'stitched together' in the same way that different pages of app...
I rotate my image with:
UIImage *image = [UIImage imageNamed:@"doneBtn.png"];
CGImageRef imgRef = image.CGImage;
CGFloat width = CGImageGetWidth(imgRef);
CGFloat height = CGImageGetHeight(imgRef);
CGAffineTransform transform = CGAffineTransformIdentity;
CGRect bounds = CGRectMake(0, 0, width, height);
transform = CGAffineTransformRota...
How to use NSPredicate for matching multiple conditions?
I have a query Select * from Entity where name = "Sony" and type ="cd";
How i can give this "and" in NSPredicate...
Please help....
...
Hi,
I've been puzzling over path rendering for the past couple of days without any real solution.
By path rendering I mean given a set of x,y data points (at varying distance) to draw a dashed line (or in my case a rotated quad) of fixed length at regular intervals between the give data set points to create a smooth path.
If you have ...
Hey guys,
I have a table view which I'm using for some settings in my app. The tables cells are all default (no customisation at all), and simply contain some text for their label and a UISwitch for the accessory view.
My problem is that I need a reference to the switch so that I know when it has been switched on and off.
Currently I ...
I'm trying to implement delegation for a class which should call it's delegate (if any), when special things happen.
From Wikipedia I have this code example:
@implementation TCScrollView
-(void)scrollToPoint:(NSPoint)to;
{
BOOL shouldScroll = YES;
// If we have a delegate, and that delegate indeed does implement our delegate m...
Hi,
I have a little trouble switching OpenGLES views(EAGLViews). When i add an subview to EAGLView, texture that is shown in the view dissapear. I don't know why. I'm using code from tutorials for loading textures.
I have a view, there I'm displaying texture, then I add subview to this view by calling addSubview method. And then, when ...
With the below code I'm creating a fetch request. The problem I'm having is getting the fetch request data and doing something with it like putting it into a variable (like I'm trying to do below with the firstManagedObject variable). I.e., I don't understand what to do with my "result" NSArray that I've created (shown in below code) t...
for example, it seems impossible to implement delegation techniques without creating warnings. This really makes no sense, because:
if (self.myDelegate != nil) {
BOOL callDelegate = [self.myDelegate respondsToSelector:@selector(fooDidHappen:WithBar:)];
if (callDelegate) {
[self.myDelegate fooDidHappen:foo withBar:bar];
}
...
I would love to know how to color an image (make a white .png red, for example). I have seen various suggestions but never any confirmation that this is actually possible. I have tried this:
-(UIImage *)colorizeImage:(UIImage *)baseImage color:(UIColor *)theColor {
UIGraphicsBeginImageContext(baseImage.size);
CGContextRef ctx =...
Is there a shortcut method much like NSHomeDirectory() and NSTemporaryDirectory to get to the resources folder within your project?
Is the /resources/ folder the best place to be storing a file?
...
What is the best way of letting the user edit text with in-line images (or at least text with different background colours) on the iPhone?
The UITextView doesn't support this.
Edit: I just noticed that the e-mail client on the iPhone can edit text with images. So it's definitely possible.
...
Is there a way for Mobile Safari to recognize a site meant for mobile phones and automatically zoom in? How does that work on other phones and browsers?
I'd like to avoid looking at user_agent and sending a different page for each mobile browser.
...
Hey folks,
I'm starting to go a little crazy with this one.
I have an iphone application with a somewhat complex view structure it is a tabbed application with either a view controller or a navigation controller on each tab.
The main controller for one tab uses the viewDidAppear callback to reload any data that has been modified sin...
Hello all,
I am planning to post an application for iPhone in iTunes Store. Soon I am gonna provide an upgrade for it. But later to current version. I want to know how the upgrade system works in iPhone. Like does it replaces the whole application and reinstall it deleteing the previous database or it adds the new version keeping the da...
Is there any way to change the 47x47 PNG, pointed to within info.plist, for the iPhone springboard icon from within code?
I understand I can add a translation and change the springboard icon per language that the iPhone supports via a changed info.plist per language, but I would like to change the springboard icon for my iPhone app base...
I just used UIAlertView to show "loading..." with a progress bar showing how much data my app is loading so far. And as the HIG says, I'm doubt Apple reviewers will approve that action. Since the alert is not supposed to "alert" users when things are going on normally.
So, if I override it with a custom background, would the Apple revie...
Hi,
I am using SQLite3 in my iPhone app to select data from a table (tbresults), do some calculations on the data and display it in my uitableview. The sql command uses the SUM function and my app doesn't seem to like it.
The method where I do the select from the table is below but processing seems to fail at the following line.
if(s...
I have a barButtonItem that calls an action which swaps two views in an animation block. I disable the barButtonItem at the beginning of the action method that it calls, and the I want to enable it when its finished, so that the user can't flip the view again before it has finished flipping.
It does this in a UIView animation block, so...