Search Results

Search found 55 results on 3 pages for 'user262325'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • I can not add navigation item to navigation bar

    - by user262325
    Hello everyone I add a Navigation Bar to an view, I noticed that there is no left side arrow(Navigation Item). so I drag a Navigation Item from library to Navigation Bar, the green mark "+" displayed, but the Navigation Item was not added to the Navigation Bar actually. Welcome any comment Thanks interdev

    Read the article

  • read http header info in ASIHttpRequest asynchronous

    - by user262325
    Hello everyone One of my project is to download several large size files using ASIHTTPRequest in asynchronous mode. I hope to read the http returned header info to get the size of files. I know [request respsonseHeaders] (requestFinished: delegate method ) can do that. I tested and found that requestFinished: is only triggered when it completed the download of a whole single file. But I hope to access the function [request respsonseHeaders] before ASIHTTPRequest starting to download files (just when ASIHTTPRequest got the returned header info). I can not find the triggered event for this. Welcome any comment Thanks interdev

    Read the article

  • masked the pasword input to UITexfield

    - by user262325
    Hello everyone I hope to mask the text input to UITextFiled as: "ABCDE" to "*****" below are my codes without function - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { int l=[textField.text length]; range=NSMakeRange(1, l ); string=[[[NSString alloc]initWithString:@"*"] autorelease]; return YES; } Welcome any comment Thanks interdev

    Read the article

  • how can iPhone work as usb device?

    - by user262325
    Hello everyone I notice that there some apps make iPhone become a remote mouse or udisk. I guess it change iPhone into a usb device. but I really hope to know the mechanism of these app. Is there any sample code to help me to understand? Thanks interdev

    Read the article

  • tracking the position of dragview

    - by user262325
    Hello everyone I put a dragview on an UIView, I hope when I drag the dragview, its superview (UIView) tracks the position of the dragview and moves itself to the position where to keep dragview at the original position on the UIView. The codes show below: #import <UIKit/UIKit.h> @interface DragView : UIImageView { CGPoint startLocation; } @end #import "DragView.h" @implementation DragView - (id)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { // Initialization code } return self; } - (void)drawRect:(CGRect)rect { // Drawing code } -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent*)event { CGPoint pt=[[touches anyObject] locationInView:self]; startLocation=pt; [[self superview] bringSubviewToFront:self]; } -(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { CGPoint pt=[[touches anyObject] locationInView:self]; CGRect frame=[self frame]; frame.origin.x+=pt.x-startLocation.x; frame.origin.y+=pt.y-startLocation.y; CGRect frame1=[[self superview] frame];//superview of the dragview frame1.origin.x+=frame.origin.x; //tracks the postion of dragview frame1.origin.y+=frame.origin.y; [[self superview] setFrame: frame1 ]; //move to new position [self setFrame:frame]; } my problem is that the UIView moved but lagged to the movement of the drageview(RED BLOCK). Welcome any comment Thanks interdev

    Read the article

  • how to capture the clicked url on UIWebView

    - by user262325
    Hello everyone I hope to capture the clicked url on an UIWebView - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { if (navigationType == UIWebViewNavigationTypeLinkClicked) { NSURL *URL = [request URL]; NSString *s=[URL absoluteString]; } but I noticed that this URL is not the url which is clicked and will be displayed on UIWebView, normally it is the url of current web page display on UIWebView. Welcome any comment Thanks interdev

    Read the article

  • Are there any tools to speed up Cocoa development?

    - by user262325
    I noticed that there is much repeated work to do when creating Cocoa source code. For example, if I set an instance for an object: NSMutableArray *infoArray; I need add code: @property (retain,nonatomic) NSMutableArray *infoArray; @synthesize infoArray; in - (void)dealloc { I also need add: [infoArray release]; Is there any tool that can automate this, perhaps by automatically paste or copy the source code and add the repeated code at right place?

    Read the article

  • Is it possible to change UIBarButtonItem title and style in runtime?

    - by user262325
    Hello everyone In one project, I hope to change UIBarButtonItem and style in runtime editBarItemButton links to a UIBarButtonItem which original status are style:UIBarButtonItemStyleBordered title:Edit if I press the bar item button, it will execute the codes below: [editBarItemButton setStyle: UIBarButtonItemStyleDone]; [editTarBarItemButton setTitle:@"Done" ]; but neither the style nor title has changed. Welcome any comment Thanks interdev

    Read the article

  • memory leak when removing objects in NSMutableArray

    - by user262325
    Hello everyone I hope to store MYFileObj to NSMutableArray (fileArray) and display data on an UITavleView(tableview). //----------------------------------MYFileObj #import <UIKit/UIKit.h> @interface MYFileObj : NSObject { NSString *fileName; } -(void) setFileName:(NSString *)s ; -(NSString *) fileName ; @end the array I want to store data NSMutableArray *fileArray; I created new object and add to fileArray MYFileObj *newobj=[[MYFileObj alloc] init ]; NSString *ss=[[NSString alloc] initWithFormat:@"%@",path] ; [newobj setFileName:ss]; [ss release]; [fileArray addObject:newobj]; [newobj release]; [atableview reloadData]; After the first time relaodData and do something, I want to reload fileArray and redraw atableview. //code to remove all object in atableview if([fileArray count]>0) { [fileArray removeAllObjects]; [atableview reloadData]; } I notice that there are memory leak. I hope to know the method "removeAllObjects" removes only MYFileObj themselves or also removes MYFileObj's member property "fileName"? Thanks interdev

    Read the article

  • NSMutableArray for Object which has NSString property causes memory leak

    - by user262325
    Hello everyone I hope to add objects to a NSMutableArray "myArray", The NSMutableArray is the array for FileObj which has a NSString property "fileName" #import <UIKit/UIKit.h> @interface FileObj : NSObject { NSString *fileName; } -(void) setfileName:(NSString *)s ; -(NSString *) getfileName ; @end // // File.m// #import "File.h" @implementation FileObj -(void) setfileName:(NSString *)s ; { fileName=s; } -(NSString *) getfileName ; { return fileName; } @end I initialize the myArray here: NSMutableArray *temarray; temarray=[[NSMutableArray alloc] init]; self.myArray=temarray; [temarray release]; the codes to add object to myArray FileObj *newobj=[[FileObj alloc]init ]; NSString *fieldValue2 = [[NSString alloc] initWithUTF8String:@"aaaa"]; [newobj setfileName:fieldValue2]; [myArray addObject:newobj]; [fieldValue2 release]; //**if I enabled the line, it will cause crash** //**if I disable the line, it will cause memory leak** [newobj release]; Welcome any comment Thanks interdev

    Read the article

  • sqlite error :/* SQL error or missing database */

    - by user262325
    Hello everyone I have a project in which I stored sqlite database file "data.sqlite3" to 'Group'&files'-'resource' Below are my viewcontroller source codes //-myviewcontroller.h #import "sqlite3.h" #define kFilename @"data.sqlite3" //myviewcontroller.m -(NSString *)dataFilePath { NSArray *paths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; return [documentsDirectory stringByAppendingPathComponent:kFilename]; } -(void)f { if (sqlite3_open([[self dataFilePath] UTF8String],&database)!=SQLITE_OK) //dataFilePath returns ///Users/interdev/Library/Application Support/iPhone Simulator/User/Applications/095C6E05-4EAE-4817-883E-A72E39D439E0/Documents/data.sqlite3 { sqlite3_close(database); NSAssert(0,@"Failed to open database");//no problem } NSString *query = @"SELECT * FROM table1 ORDER BY ROW";//table1 is table name sqlite3_stmt *statement; NSInteger v=sqlite3_prepare_v2( database, [query UTF8String], -1, &statement, nil); NSString *zs= [NSString stringWithFormat:@"%d",v]; NSLog(@" The buttontitile is %@ ",zs); if ( v == SQLITE_OK) { // ... } I checked value of v in log, it always is 1 #define SQLITE_ERROR 1 /* SQL error or missing database */ I do not know why this happened.

    Read the article

  • load the videos in ipod/iphone library but always crash

    - by user262325
    Hello everyone I hope to load the videos in ipod/iphone library and list in UITableView like app 'videos'. the codes show below, but it always cause crash UIImagePickerController *picker=[[UIImagePickerController alloc]init]; picker.sourceType= UIImagePickerControllerSourceTypePhotoLibrary; picker.mediaTypes = [NSArray arrayWithObject:kUTTypeMovie]; picker.delegate = self; Welcome any comment Thanks interdeb

    Read the article

  • display original image color with UIBarButtonItem

    - by user262325
    I used codes below to display a image on an UIBarButtonItem UIBarButtonItem *myButtonItem; myButtonItem= [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"image.png"] style:UIBarButtonItemStylePlain target:self action:@selector(pressB:)]; but the image color is two colors(red/blue), but the image displayed on the ButtonItem is white. Iy looks like IOS change it to white color automatically. Welcome any comment

    Read the article

  • Objective-C: Cannot Change Value of Instance Variable Inside a Function

    - by user262325
    Hello everyone, I cannot change the value of an instance variable inside a function. I have defined a class: // info.h #import <Foundation/Foundation.h> @interface NSMyObject : NSObject { NSInteger i; } -(void) setI:(NSInteger)v; @end #import "info.h" @implementation NSMyObject -(void) setI:(NSInteger)v ; { i=v; } - (void)dealloc { [super dealloc]; } @end I call a function 'myFunction' with parameter temObj which is a NSMyObject instance. myFunction(temObj);//temObj is NSMyObject In the function, I can change the value of the instance variable of parameter obj. -(void)myFunction:(NSMyObject*) obj; { [obj setI:0]; } ... expecting this to change the content of temObj. But when I check the results of operation on obj in function myFunction the value of temObj.i has not changed. Welcome any comment Thanks

    Read the article

  • call function and change value of parameter

    - by user262325
    Hello everyone I have constructed one object: // info.h #import <Foundation/Foundation.h> @interface NSMyObject : NSObject { NSInteger i; } -(void) setI:(NSInteger)v; @end #import "info.h" @implementation NSMyObject -(void) setI:(NSInteger)v ; { i=v; } - (void)dealloc { [super dealloc]; } @end Is it possible I call a function 'myFunction' with parameter temObj (NSMyObject) myFunction(temObj);//temObj is NSMyObject in the function I can change the content of parameter obj -(void)myFunction:(NSMyObject*) obj; { [obj setI:0]; } then I hope the content of temObj also can be changed. But I check the operation on obj in function myFunction can not affect temObj where I call myFunction. Welcome any comment Thanks

    Read the article

  • touch multi UIViews

    - by user262325
    Hello everyone There are a series UIViews arranaged very close. I hope when my finger touchs some of them, my app can detect which UIView touched. Maybe one or two or three.(because the displayed parts of each UIView are too thin). I hope to get the middle x value of the touch, then spread the UIView where the middle x value locates and the UIViews near it. Welcome any comment Thanks interdev

    Read the article

< Previous Page | 1 2 3  | Next Page >