Hi!
I have a class which work is to parse a text into several pages.
I use sizeWithFont: method to identify when one page ends and another starts.
But unfortunately since the amount of text which needs to be parsed is pretty big, whole operation needs to be performed on a background thread (takes several second to complete). And therefo...
I am new to iphone development.I am doing research on voice recording in iphone .I have downloaded the "speak here" sample program from Apple.It consist of LevelMeter.h file, in which
@interface LevelMeter : UIView {
CGFloat _level, _peakLevel;
}
The property are set as
@property CGFlo...
Suppose I have an model object class Box. In my Box class I add images references (png), audio (mp3) etc...
Rather than store them as NSData it seems better to reference the paths to the files...to save memory.
I would like archive this Box class. On the desktop we would use Document Packages (NSFilewrapper). But this class is not part ...
I am trying to generate a UITextField in a view like this. I don't mind using IB or doing it programmatically.
...
I'm trying to access an NSMutableArray which is a data member of my AppDelegate class. It is synthesized in the implementation, and is an array of a custom class which has a "name" NSString data member.
I currently use it to fill a Table View (a SubView) like this:
cell.textLabel.text = [[[delegate contentArray] objectAtIndex:indexPat...
First, in my root view controllers viewDidLoad, I initialize an NSDictionary with arrays of NSManagedObjects, like so:
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"Decks";
UIBarButtonItem *browseButton = [[UIBarButtonItem alloc] initWithTitle:@"Browse" style:UIBarButtonItemStylePlain target:self action:@selecto...
Hi all, I have Core Data working in my app. So, I fetch an XML file, parse the data into model objects and insert them into core data. They are saved in the persistent store and I can access them when I relaunch the app. However, I want to be able to refresh the data in the persistent store at will, so I need to first remove existing ...
Given a view hierarchy that looks something like this:
ContainerView
UIScrollView
ModuleView
ModuleView
ModuleView
...
I'd like the ContainerView to lay the ModuleViews out in some arbitrary fashion (list, grid etc.). To do this, I'd implement -[ContainerView layoutSubviews] which would iterate through the ModuleView...
I use instruments to see memory leaks. At least in one scenario where I am constantly flicking through slides/pages (inside UIScrollView) I don't see any memory leak. Using instruments - under "Allocation lifespan" I switch to view "Created & Still Living" and see memory around 1.17MB throughout. I assume this means my app is using only...
The table view section headers in my plain (non-grouped) UITableView only appear when the table has been placed into editing mode. This is because I have two sections in the table view: Active and Inactive. I only wish the Active section to be displayed normally, but require both Active and Inactive to be displayed when in editing mode. ...
I created a CoreData application using the Cocoa Touch Template. I modified the included .xcdatamodel file to have an attribute called 'Date' with datatype of 'Date' and other string attributes.
I use following codes to save data for the 'Date' field:
NSDateFormatter *dateFormatter=[[[NSDateFormatter alloc] init] autorelease] ;
[dateFo...
I need to save an camera image from my application to the desktop so i can preview it. is it possible? The images that comes with the simulator seems to be too small.
...
Hey all,
I am working with the iPhone SDK and I have to process a webservice response I receive from an external service.
The response data consists of an XML string that was UTF8-encoded to a byte array.
This byte array is converted to string
This string is put into a XML wrapper element
The wrapper is returned via an HTTP response
...
Hi All
I am using following code for showing a next view(tableview) in Iphone app.
It sometime works and some time app crashes without any exception log
NSLog(@"Ok"); is log everytime
50% attempts application crashes
-(IBAction)statusInitiationButAction:(id)sender{
@try {
NSArray *tempArrIniId = [eventInitiationArray v...
I have a UIScrollFrame that contains multiple UIImageViews.
What is the correct way of supporting zoom in such a control?
Which view should 'viewForZoomingInScrollView' return?
...
I'm calling the following code from drawRect
- (void) drawPartial:(UIImage *)img colour:(UIColor *)colour {
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSaveGState(context);
CGContextTranslateCTM(context, 0.0, self.bounds.size.height);
CGContextScaleCTM(context, 1.0, -1.0);
CGContextDrawImage(c...
Using Apple's Mail application as an example; pretend it uses Core Data. When you touch an email account, it shows you all the messages in that account. So the controller did a fetch request for all the messages in that account.
Then you touch a message and drill one level deeper, now you are viewing a single message. This single messag...
I have got a hierarchy where UIScrollviews exist within each other.
How may I redirect swipe events for a certain area to an inner scrollview?
...
I am writing a basic image processing app. Right now I have code in place to load an image via the Camera or the image picker and set it as the source image for a UIImageView object in my interface. The object is configured with the "Aspect Fill" property, so I don't have to programmatically crop the image.
Looking at the sample code pr...
Hi Everyone:
I am wondering if there is some way to fade in and out audio using AVAudioPlayer in CocoaTouch, with a pause command once the music finishes fading and then a play command once the fading begins. I have heard that one can use NSTimer for this purpose, but I am unsure of the easiest way to accomplish this.
Thanks for any h...