Is there some way I can do something like:
@implementation MyView
- (void)drawRect:(CGRect)rect
{
// Get the thing I'm supposed to draw (CGImageRef, pattern, etc.) and draw it
// i.e. not real code
CGContextDrawWhatever(self.objectThatHoldsDrawing.drawing);
}
...
Hi,
I am trying to create a grid view by using a UITableView (my older questions have pointed me in this direction) and am currently setting up the views for the individual items. Having created a custom UITableViewCell that displays 3 items per row, I have decided to pull these items into a subclass of UIView called ItemView.
This Ite...
Hi,
I have a view with tab bar at the bottom. This view is pushed on a navigation controller, so there is also a navigation bar at the top. Unto this view, I would like to show a table view, which I create from its own nib. When I add this view as a subview, it overlaps the tab bar.
Is there a way to make this subview automatically re...
I have a problem with a function running before the previous one has had time to finish. According to the logs they both run but it is almost as if the function called from the AppDelegate is put onto a separate thread.
-(IBAction) checkLocation {
[AppDelegate locateMe];
[self checkForChangeAndReloadTable];
}
The locateMe function...
I'm trying to use XCode's Leaks utility to fix some memory leaks in my code. Is there a better and more understandable way to check for leaks with explanations that pinpoint the exact line and/or offer suggestions?
Another question, I'm using AVAudioRecorder in my code in one of my view controllers. Should I load the recorder in viewDid...
I have done one iPhone app in Objective-C. When I want to link a Label to some data in that I would declare it like this:
@interface CityDetailViewController : UIViewController {
UILabel *cityName;
}
@property(nonatomic, retain) IBOutlet UILabel *cityName;
And then when the CityDetailViewController object is created in code I would ...
I'm trying to accomplish the following:
Swap out the content of a UIView or Subview using UIButtons or a toolbar. I have a view laid out like the illustration below. I want to swap out the content of the "UIView to swap" sub view by clicking on buttons or buttons on a toolbar. So you click button 1 and a view is loaded into the "UIView...
So, we have a project using the Three20 Library from Facebook (http://github.com/facebook/three20), and we're trying to compile against the latest version (HEAD from Github).
Previously it's worked fine, but something has now changed :)
The error I'm getting is an unrecognized selector on TTTableViewController:
[TTViewControllerSubCl...
Is it possible to control a page controller with custom buttons instead of the Page control dots? Similar to a jQuery slider in js?
...
I have made a UIImageView, added it to the subview, and plan to animate it. I am using the setAnimationDidStopSelector method and was wondering if I could get it to call a function 3 or so seconds after the animation stops.
Here is the current line of code I am using:
[UIView setAnimationDidStopSelector:@selector(onAnimationComple...
I've got experience in C/C++ and am trying to now learn Objective-C for iPhone development. I have very little web design experience.
I'm trying to create an app for a friend's site that accesses a search feature from a website and then display the results in a UITableView. For example, (this isn't the site I'll be using, but...) usin...
Hello every one
I have a project in which need to put 2 UITableView on one UIView.
I know it need to set and can function below
-(NSString *) tableView:(UITableView *) tableView
titleForHeaderInsection:(NSInteger)section
(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView
(NSInteger)tableView:(UITableView *)tableView...
I have a webview and I want to manually switch to another tab during a specific event. The event is arbitray, but I can't figure out hwo to switch teh tab. On my other views, I have the following code:
self.tabBarController.selectedViewController = [self.tabBarController.viewControllers objectAtIndex:2];
However, this does not work in...
I'm some what confused as to the difference between accessing an instance variable via self or just by name (when working inside the class).
For instance, take this class:
.h:
@interface Register : NSObject {
NSString *mName;
}
- (id) initWithName:(NSString *) name;
.m:
- (id) initWithName:(NSString *)name
{
if (self == [supe...
I'm developing an iPhone app that uses a user account and a web API to get results (json) from a website. The results are a list of user's events.
Just looking for some advice or strategies - when to cache and when to make an api call... and if the iPhone SDK has anything built in to handle these scenarios.
When I get the results from ...
I want to add a FADED shadow/outer glow to a UIImage/UIImageView/UIView but I know no Core Graphics at all.
Edit:
Please Help!!
...
I'm building a web iPhone app that involves changing the viewport on
demand with Javascript. I do this by changing the content attribute of
the tag. This works well most of the times,
except when orientation change is involved.
Everytime I try to change the viewport after an orientation change
event, the page doesn't zoom to it's ...
Does anyone know of a native graphing library for the iPhone SDK? I have a free iPhone polling app called Show of Hands that currently uses calls to google charts via embedded safari pages, e.g. http://www.showofhands.mobi/Viewmore.aspx?qid=9245968c-d40d-478c-8781-804d086cd643 . Pros: free and easy and web-accessible. Cons: slower and le...
Hello All,
I am facing a problem of character encoding. when i am posting data with special character all the things after the special character are not post to server.How do to convert special characters?
Thank You.
...
view1 = [[View1 alloc] init]; //Create the first view
UINavigationController *navigationController1 = [[UINavigationController alloc] initWithRootViewController:view1];
navigationController1.navigationBar.tintColor =[UIColor blackColor];
View1 is inherit from UIViewController. So I create a *view1, then I create a UINavigationControl...