Search Results

Search found 159 results on 7 pages for 'srikanth rongali'.

Page 1/7 | 1 2 3 4 5 6 7  | Next Page >

  • View hidden contents of usb device

    - by Srikanth Suresh
    I have a USB with the following contents on ls -lah total 8.0K drwx------ 1 srikanth srikanth 4.0K May 27 22:54 . drwxr-xr-x 4 root root 4.0K May 28 19:37 .. -rw------- 2 srikanth srikanth 0 May 27 22:52 Files.az3w On viewing the properties of the folder I have the following information: 90.4Mb used and 16.1GB free There is data in this pen drive which I am currently unable to view also it is sensitive. After searching about hiding contents in a USB I think that there is a hidden partition here that I cant access. How should I proceed to view the contents without damaging the files already present?

    Read the article

  • how can load images from plist in to UITableView ?

    - by srikanth rongali
    I have stored the videos and the thumbnail images of the videos in Documents folder. And I have given the path in plist. In plist I took an array and I added directories to the array. And in the dictionary I stored the image path /Users/srikanth/Library/Application Support/iPhone Simulator/User/Applications/9E6E8B22-C946-4442-9209-75BB0E924434/Documents/image1 for key imagePath. for video /Users/srikanth/Library/Application Support/iPhone Simulator/User/Applications/9E6E8B22-C946-4442-9209-75BB0E924434/Documents/video1.mp4 for key filePath. I used following code but it is not working. I am trying only for images. I need the images to be loaded in the table in each cell. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease]; [cell setAccessoryType:UITableViewCellAccessoryDetailDisclosureButton]; UIImageView *image2 = [[UIImageView alloc]init]; image2.frame = CGRectMake(0.0f, 0.0f, 80.0f, 80.0f); image2.backgroundColor = [UIColor clearColor]; //image2.image = [UIImage imageNamed:@"snook.png"]; image2.tag = tag7; } NSDictionary *dictOfplist = [cells objectAtIndex:indexPath.row]; [(UIImageView *)[cell viewWithTag:tag7] setImage:[dictOfplist objectForKey:@"imagePath"]]; return cell; } - (void)viewDidLoad { [super viewDidLoad]; self.title = @"Library"; self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Close" style:UIBarButtonItemStyleBordered target:self action:@selector(close:)]; NSString* plistPath = [[NSBundle mainBundle] pathForResource:@"details" ofType:@"plist"]; contentArray = [NSArray arrayWithContentsOfFile:plistPath]; cells = [[NSMutableArray alloc]initWithCapacity:[contentArray count]]; for(dCount = 0; dCount < [contentArray count]; dCount++) [cells addObject:[contentArray objectAtIndex:dCount]]; } How can I make this work. Thank you.

    Read the article

  • How can get image from a path in to UITAbleViewCell ?

    - by srikanth rongali
    I have the following path in NSString *path1, /Users/srikanth/Library/Application Support/iPhone Simulator/User/Applications/9E6E8B22-C946-4442-9209-75BB0E924434/Documents/snook.jpg How can I show the image snook.jpg. I need it to show in UITableViewCell for cell.imageView.image if path1 has the path. I used the following to get the last part of the path1 , snook.jpg. NSURL *url = [NSURL URLWithString:path1]; NSString *imageString = [url path]; But, url is showing as nil. How can I do it ? Thank you.

    Read the article

  • I need to load a video stored in Applications folder in to a UITableView ?

    - by srikanth rongali
    I need to load a video stored in Applications folder in to a table view. When I touched the cell the video plays. I used the following code to get all the video files in to an array. NSFileManager *fileManager = [NSFileManager defaultManager]; NSArray* contents = [fileManager directoryContentsAtPath:@"/Users/srikanth/Desktop/Projects/UF/Table2/Videos"]; for(a = 1; a < [contents count]; a++) NSLog(@"Array contents: %@", [contents objectAtIndex:a]); cells = [[NSMutableArray alloc]initWithCapacity:[contents count]]; But how can I load the videos into UITableView. I used NSBundle for loading videos by giving path. It worked. But, now I need the videos to load from the array contents. When I touch the cell of the table the corresponding file from the array contents si to be loaded. How can I make it? Thank you.

    Read the article

  • Web Application Integration Steps in OAM 11gR2 (High Level)

    - by Venkata Srikanth
    Install OAM, Webtier (OHS) and WebGate as per the standard installation steps. Create a WebGate instance (i.e deploy WebGate) A WebGate instance must be created that will copy required bits of agent from WEBGATE_HOME to WebGate instance location that shares the same INSTANCE_HOME with OHS ./deployWebGateInstance.sh –w /Oracle/Middleware/Oracle_WT1/instances/instance1/config/ohs1 –oh /Oracle/Middleware/Oracle_OAMWebGate1 Note: Here –w flag indicates OHS instance folder and –oh indicates the WebGate Oracle home Configure WebGate In the webgate configuration the EditHttpdConf utility will copy OUI instantiated apache_webgate.template from WEBGATE_HOME to webgate instance location (renamed to webgate.conf), and update httpd.conf with one additional line to include webgate.conf. export LD_LIBRARY_PATH=$ LD_LIBRARY_PATH:/Oracle/Middleware/Oracle_WT1/lib Navigate to /Oracle/Middleware/Oracle_OAMWebGate1/webgate/ohs/tools/setup/InstallTools ./EditHttpdConf –w /Oracle/Middleware/Oracle_WT1/instances/instace1/config/OHS/ohs1 –oh /Oracle/Middleware/Oracle_OAMWebGate1 –o webgate.conf Register WebGate Use RREG tool to register the OAM 11G WebGate Navigate to /Oracle/Middleware/Oracle_IDM1/oam/server/rreg/input Edit OAM11Grequest.xml. Change the specific xml content to include the weblogic admin URL, agentBaseURL, host identifier etc.. Navigate to /Oracle/Middleware/Oracle_IDM1/oam/server/rreg/bin Set permissions to oamreg.sh à chmod 777 oamreg.sh Edit oamreg.sh and set OAM_REG_HOME=/Oracle/Middleware/Oracle_IDM1/oam/server/rreg ./oamreg.sh inband input/OAM11Grequest.xml Enter the WebLogic admin credentials when prompted. After performing the above steps, there will be two artifcats created under Oracle/Middleware/Oracle_IDM1/oam/server/rreg/output, namely ObAccessClient.xml (Stroing webgate config parameters) and cwallet.sso (storing the agent key). These files must be copied to WebGate instance config folder (/Oracle/Middleware/Oracle_WT1/instances/instance1/config/ohs1/webgate/config) Restart OHS Deploy the web application (myApp) in WebLogic application server Proxy Configuration in OHS The mod_wl_ohs module enables requests to be proxied from Oracle HTTP Server 11g to Oracle WebLogic Server. Navigate to /Oracle/Middleware/Oracle_WT1/instances/instance1/config/OHS/ohs1 Edit mod_wl_ohs.conf file to include the following: <IfModule weblogic_module> WebLogicHost <WEBLOGIC_HOST> WebLogicPort <WEBLOGIC_PORT> # Debug ON # WLLogFile /tmp/weblogic.log MatchExpression *.jsp </IfModule> <Location /myApp> SetHandler weblogic-handler # PathTrim /weblogic # ErrorPage http:/WEBLOGIC_HOME:WEBLOGIC_PORT/ </Location> Note: Here WEBLOGIC_HOST and WEBLOGIC_PORT are the WebLogic admin server host and port respectively Restart OHS. Now if we access the web application URL with OHS host and port (Ex: http://OHS_HOST:<OHS_PORT>/myApp) so that the requests will be proxied to WebLogic server. Create a new application domain Login to OAM Admin Console Navigate to Shared Componentsà Authentication Schemesà Create Authentication Scheme (Ex: LDAP Auth Scheme. Here the scheme is assoicated with LDAP Authentication Module) Navigate to Policy Configuration à Application Domain à Create Application Domain Enter the Application Domain Name and Click Apply. Navigate to Resources tab and add the resource urls (Web Application URLs that needs to be protected) Navigate to Authentication Policy tab à Create a new authentication ploicy by providing the Resource URLs (The sample Web Application URLs) and Authentication Scheme. Navigate to Authorization Policy tab à Create a new authorization policy à Enter authorization policy name and navigate to Resource Tab à Attach the Reource URL, Host Identifiers here. Navigate to Conditions tab à Add the conditions like whom to allow and whom to deny access. Navigate to Rules tab à Crate the Allow Rule and Deny Rule with the available conditions from the previous step so that the Authorization Policy may authorize the logins. Navigate to Resources tab and attach the Authentication and Authorization plocies created in the above steps. Test the Web Application Integration.

    Read the article

  • Issue with resetting auto increment from default to big number

    - by Sai Srikanth
    I have a MySQL table naming Invoice for a Inventory Monitoring site, invoice_number is bigint(19) AUTO_INCREMENT field. Currently AUTO_INCREMENT value is 1. Client want it to start the invoice_number from 50000. With the following script reset the ALTER TABLE INVOICES AUTO_INCREMENT = 50000; When I wrote an Insert Script to insert data in SQLDBX, it is putting the invoice_number from 50000. But when i am trying to do insert a record using the application(web application), the invoice_number value is starting from 1. We are making use of Spring-JDBC template to insert data into mysql database.

    Read the article

  • Is it possible to run two servers in one system ?

    - by srikanth
    I have a small problem while trying to execute the wamp server. At present in my system I am running Apache server. I have a php application. for that I am trying to install wamp server in my system. wamp server is not running. I change the port no of wamp server as : in my C:\wamp\bin\apache\Apache2.2.11\conf\ I have httpd.conf file. in that I change listener and host name with another port no. then also it is not working.

    Read the article

  • Is it possible to run two servers in one system ?

    - by srikanth
    hi, i have a small problem while trying to execute the wamp server. At present in my system i am running Apache server. i have a php application. for that i am trying to install wamp server in my system. wamp server is not running. i change the port no of wamp server as : in my C:\wamp\bin\apache\Apache2.2.11\conf\ i have httpd.conf file. in that i change listener and host name with another port no. then also it is not working. any one can you help me......... plz...

    Read the article

  • Uninstall Mongo DB completely

    - by Srikanth
    I followed the following steps to install MongoDb on my centos machine. http://andres.jaimes.net/876/setup-mongo-php-module-centos-6/ As mentioned at the end of the document, in the phpinfo() the mongoDb support was enabled. Now i need to undo all the actions i did. Till now i hve uninstalled remi-release-6.rpm which i had installed by following the link above. How to uninstall completely and undo all actions I did?

    Read the article

  • How can we add text in cocos2d by using UITextView ?

    - by srikanth rongali
    I want a UITextView in cocos2d. I used in init method UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(0,0, windowSize.height/2,windowSize.width/2)]; textView.backgroundColor = [UIColor clearColor]; textView.text = @"I am First enemy"; [textView setEditable:NO]; [[[CCDirector sharedDirector]openGLView]addSubview:textView]; the orientation is [[CCDirector sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft]; I need the text to appear in landscape mode, but I am getting the text in following way. How can I make the text to appear in the landScape mode. I am working in cocos2d. CanOI scroll the text ? What should i add to make the text scroll up and down. Thank you.

    Read the article

  • How can I use removeFromSuperView and dismissModalViewControllerAnimated at same time ?

    - by srikanth rongali
    I have a UIViewController *view1 and another UIViewController *view2; I used presentModelViewController to navigate from view1 to view2. -(void)function:(id)sender { NSLog(@"The libraryFunction entered"); LibraryController *libraryController = [[LibraryController alloc]init]; [self presentModalViewController:libraryController animated:YES]; } I have another view UITableViewController *tableView; I added it to view2 as a subView. -(void)viewDidLoad { RootViewController *rootViewController = [[RootViewController alloc] initWithStyle:UITableViewStylePlain]; UINavigationController *aNavigationController = [[UINavigationController alloc] initWithRootViewController:rootViewController]; self.navController = aNavigationController; [aNavigationController release]; [rootViewController release]; navController.view.frame = CGRectMake(0, 0, 320, 460); [self.view addSubview:navController.view]; } In RootViewController.m I have - (void)viewDidLoad { [super viewDidLoad]; self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Close" style:UIBarButtonItemStyleBordered target:self action:@selector(close:)]; } -(void)close:(id)sender { [self.view removeFromSuperview]; [self dismissModalViewControllerAnimated:YES]; } WhenI touch close button I need to return the view1. So, I removed the tableView by using removeFromSuperView. But, I am not able to get to the first view. I do not get where to use - (void)dismissModalViewControllerAnimated:(BOOL)animated; to navigate to first view1 where I have started ? How can I do this ? Thank You.

    Read the article

  • moviePlayBackDidFinish: is not called in application.

    - by srikanth rongali
    In my application I have used these notifications when playing a video. But, The problem is the control of the program is not entering in to the first two methods(moviePreLoadDidFinish and moviePlayBackDidFinish). It is entering into last method. So, after the video is played and I pressed Done button in the video, I cannot touch any object in screen. I mean I used play button for video to play in a view. After the video played the play button is deactivated. - (void) moviePreloadDidFinish:(NSNotification*)notification { } // Notification called when the movie finished playing. - (void) moviePlayBackDidFinish:(NSNotification*)notification { } // Notification called when the movie scaling mode has changed. - (void) movieScalingModeDidChange:(NSNotification*)notification { } I could not get where I was wrong ? Thank You.

    Read the article

  • CCSprite: setTexture doesn't work when the sprite is rendered using a CCSpriteSheet

    - by srikanth rongali
    My code is in cocos2d. I am getting this error in my code. To get the fast animation I used CCSpriteSheet CCSpriteSheet *danceSheet = [CCSpriteSheet spriteSheetWithFile:@"new1.png"]; [self addChild:danceSheet]; CCSprite *danceSprite = [CCSprite spriteWithTexture:danceSheet.texture rect:CGRectMake(0, 0, 119, 320)]; [danceSheet addChild:danceSprite]; danceSprite.position = ccp(danceSprite.contentSize.width/2,danceSprite.contentSize.height/2); CCAnimation *danceAnimation = [CCAnimation animationWithName:@"dance" delay:0.1f]; int frameCount = 0; for (int x = 0; x < 13; x++) { // create an animation frame CCSpriteFrame *frame = [CCSpriteFrame frameWithTexture:danceSheet.texture rect:CGRectMake(x*119,0,119,320) offset:ccp(0,0)]; [danceAnimation addFrame:frame]; frameCount++; NSLog(@"frameCount value: %d", frameCount); if (frameCount == 13) break; } CCAnimate *danceAction = [CCAnimate actionWithAnimation:danceAnimation restoreOriginalFrame:NO ]; [danceSprite runAction:danceAction]; But when I touched the screen it is giving the error CCSprite: setTexture doesn't work when the sprite is rendered using a CCSpriteSheet

    Read the article

  • how do we access values stored in NSMutableArray of NSMutableDictionary ?

    - by srikanth rongali
    I have stored values in NsMutableDictionaries . ThenI stored all the dictionaries in NSMutable Array. I need to access the values ? How can I do that ? -(void)viewDidLoad { [super viewDidLoad]; self.title = @"Library"; self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Close" style:UIBarButtonItemStyleBordered target:self action:@selector(close:)]; cells = [[NSMutableArray alloc] initWithObjects:@"dict1", @"dict2", @"dict3", @"dict4", @"dict5", @"dict6", nil]; dict1 = [[NSMutableDictionary alloc] initWithObjectsAndKeys:@"Mon, 01 Feb #2", @"date", @"0.7", @"time", @"1.2MB", @"size", @"200*200", @"pix", nil]; dict2 = [[NSMutableDictionary alloc] initWithObjectsAndKeys:@"Wed, 02 Mar #3", @"date", @"1.2", @"time", @"2.2MB", @"size", @"300*300", @"pix", nil]; dict3 = [[NSMutableDictionary alloc] initWithObjectsAndKeys:@"Tue, 03 Apr #5", @"date", @"1.7", @"time", @"2.5MB", @"size", @"240*240", @"pix", nil]; dict4 = [[NSMutableDictionary alloc] initWithObjectsAndKeys:@"Mon, 01 Feb #2", @"date", @"0.7", @"time", @"1.2MB", @"size", @"200*200", @"pix", nil]; dict5 = [[NSMutableDictionary alloc] initWithObjectsAndKeys:@"Mon, 10 Nov #5", @"date", @"2.7", @"time", @"4.2MB", @"size", @"200*400", @"pix", nil]; dict6 = [[NSMutableDictionary alloc] initWithObjectsAndKeys:@"Mon, 11 Dec #6", @"date", @"4.7", @"time", @"2.2MB", @"size", @"500*200", @"pix", nil]; //[cells addObject:dict1]; //[cells addObject:dict2]; //[cells addObject:dict3]; //[cells addObject:dict4]; //[cells addObject:dict5]; //[cells addObject:dict6]; } // Customize the number of rows in the table view. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [cells count]; } // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease]; //cell.contentView.frame = CGRectMake(0.0f, 0.0f, 320.0f, 80.0f); [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; UIImageView *image1 = [[UIImageView alloc]init]; image1.frame = CGRectMake(0.0f, 0.0f, 80.0f, 80.0f); image1.tag = tag7; UILabel *dateLabel = [[UILabel alloc]init]; dateLabel.frame = CGRectMake(100.0f, 5.0f, 120.0f, 25.0f); dateLabel.font = [UIFont fontWithName:@"Georgia" size:10]; dateLabel.tag = tag1; UILabel *timeLabel = [[UILabel alloc] init]; timeLabel.frame = CGRectMake(100.0f, 30.0f, 40.0f, 25.0f); timeLabel.font = [UIFont fontWithName:@"Georgia" size:10]; timeLabel.tag = tag2; UILabel *sizeLabel = [[UILabel alloc] init]; sizeLabel.frame = CGRectMake(160.0f, 30.0f, 40.0f, 25.0f); sizeLabel.font = [UIFont fontWithName:@"Georgia" size:10]; sizeLabel.tag = tag3; UILabel *pixLabel = [[UILabel alloc] init]; pixLabel.frame = CGRectMake(220.0f, 30.0f, 40.0f, 25.0f); pixLabel.font = [UIFont fontWithName:@"Georgia" size:10]; pixLabel.tag = tag4; UILabel *shareLabel = [[UILabel alloc] init]; shareLabel.frame = CGRectMake(100.0f, 55.0f, 100.0f, 25.0f); shareLabel.font = [UIFont fontWithName:@"Georgia" size:10]; shareLabel.tag = tag5; UILabel *deleteLabel = [[UILabel alloc] init]; deleteLabel.frame = CGRectMake(220.0f, 55.0f, 100.0f, 25.0f); deleteLabel.font = [UIFont fontWithName:@"Georgia" size:10]; deleteLabel.tag = tag6; [cell.contentView addSubview:dateLabel]; [cell.contentView addSubview:timeLabel]; [cell.contentView addSubview:sizeLabel]; [cell.contentView addSubview:pixLabel]; [cell.contentView addSubview:shareLabel]; [cell.contentView addSubview:deleteLabel]; [cell.contentView addSubview:image1]; [dateLabel release]; [timeLabel release]; [sizeLabel release]; [pixLabel release]; [shareLabel release]; [deleteLabel release]; [image1 release]; } // Set up the cell... [(UILabel *)[cell viewWithTag:tag1] setText:[cells objectAtIndex:[dict1 objectForKey: @"date"]]]; [(UILabel *)[cell viewWithTag:tag2] setText:[cells objectAtIndex:[dict1 objectForKey: @"time"]]]; [(UILabel *)[cell viewWithTag:tag3] setText:[cells objectAtIndex:[dict1 objectForKey: @"size"]]]; [(UILabel *)[cell viewWithTag:tag4] setText:[cells objectAtIndex:[dict1 objectForKey: @"pix"]]]; [(UILabel *)[cell viewWithTag:tag5] setText:@"Share"]; [(UILabel *)[cell viewWithTag:tag6] setText:@"Delete"]; cell.imageView.image = [UIImage imageNamed:@"image2.png"]; return cell; } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 80.0f; } I did in above way but it is not working. I know the mistake is at the accessing values. but, I could not get how to do it ? Thank You.

    Read the article

  • how can stop creating duplicates in camera roll while using UISaveVideoAtPathToSavedPhotosAlbum to s

    - by srikanth rongali
    I have a video in applications documents folder. I need it to be saved in camera roll. So, I used UISaveVideoAtPathToSavedPhotosAlbum method to save it in camera roll. It's working and I can see the video added to camera roll. But, the problem is every time I execute the application with same video(with same file name), it is added another time in camera roll instead of replacing the old one. So, it is creating the duplicates of the video. How can I make the application work like if a video is present in camera roll and again added with same file name, then old one is replaced by new video.

    Read the article

  • When we should use pushScene and replaceScene in cocos2d ?

    - by srikanth rongali
    Hi, I cocos2d, I am using pushScene and replaceScene to move to next scene. But, I am confused which we should use? When I am using replaceScene in some places app is crashing and giving errors like -[UITextView length]: unrecognized selector sent to instance 0x842a750 Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UITextView length]: unrecognized selector sent to instance 0x842a750' But, in my program I am not passing length to UITextView. My program is in this way In scene1 I have UITextView, and I am replacing this scene with scene2. Then -(id)buttonPressed:(id)sender { [description removeFromSuperview]; // It is the textView(description) CCScene *Scene = [CCScene node]; CCLayer *Layer = [scene2 node]; [Scene addChild:Layer]; [[CCDirector sharedDirector] setAnimationInterval:1.0/60]; [[CCDirector sharedDirector] replaceScene: Scene]; } But, when I am using pushScene in presence of replaceScene it is working good. Please clarify me which one should use in which cases ? Thank You

    Read the article

  • Cocos2D: Problem Rotating a CCMenu

    - by srikanth rongali
    If I try to do actions over menuItems but the actions are not running as expected. I think code below should make the menuItem rotate by 90 degrees but when I run it, the menuItem translates from its coordinates to another coordinate then returns to its original coordinate. The complete translation takes 3 seconds. What I need is for the menuItem to rotate by 90 degrees in place within a 3 seconds duration. Please explain where I have done wrong? CCMenuItemImage *targetE;//Globally declared CCMenu *menu;//Globally declared -(id)init { if( (self = [super init]) ) { isTouchEnabled = YES; CGSize windowSize = [[CCDirector sharedDirector] winSize]; targetE = [CCMenuItemImage itemFromNormalImage:@"grossinis_sister1.png" selectedImage:@"grossinis_sister1.png" target:self selector:@selector(touch:)]; menu = [CCMenu menuWithItems:targetE,nil]; id action4 = [CCRotateBy actionWithDuration:3.0 angle:90]; [menu runAction: [CCSequence actions: action4, nil]]; menu.position = ccp(windowSize.width/2 + 200, windowSize.height/2); [self addChild: menu z:10]; } return self; } @end Thank You.

    Read the article

  • How we should load the MFMailViewController in cocos2d ?

    - by srikanth rongali
    I am writing an app in using cocos2d. This method I have written for the selector goToFirstScreen: . The view is in landscape mode. I need to send an email. So, I need to launch the MFMailComposeViewController. I need it in portrait mode. But, the control is not entering in to viewDidLoad of the mailMe class. The problem is in goToScreen: method. But, I do not get where I am wrong ? -(void)goToFirstScreen:(id)sender { NSLog(@"goToFirstScreen: "); CCScene *Scene = [CCScene node]; CCLayer *Layer = [mailME node]; [Scene addChild:Layer]; [[CCDirector sharedDirector] setAnimationInterval:1.0/60]; [[CCDirector sharedDirector] pushScene: Scene]; } This is my mailMe class to launch mail controller #import <UIKit/UIKit.h> #import <MessageUI/MessageUI.h> #import <MessageUI/MFMailComposeViewController.h> #import "cocos2d.h" @interface mailME : CCLayer <MFMailComposeViewControllerDelegate> { UIViewController *mailComposer; } -(void)displayComposerSheet; -(void)launchMailAppOnDevice; @end #import "mailME.h" @implementation mailME -(void)viewDidLoad { NSLog(@"Enetrd in to mail"); Class mailClass = (NSClassFromString(@"MFMailComposeViewController")); if (mailClass != nil) { if ([mailClass canSendMail]) { [self displayComposerSheet]; } else { [self launchMailAppOnDevice]; } } else { [self launchMailAppOnDevice]; } } -(void)displayComposerSheet { CCDirector *director = [CCDirector sharedDirector]; [director pause]; [director stopAnimation]; [director.openGLView setUserInteractionEnabled:NO]; mailComposer = [[UIViewController alloc] init]; [mailComposer setView:[[CCDirector sharedDirector]openGLView]]; [mailComposer setModalTransitionStyle:UIModalTransitionStyleCoverVertical]; MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; picker.mailComposeDelegate = self; [picker setSubject:@"Hello!"]; NSArray *toRecipients = [NSArray arrayWithObject:@"[email protected]"]; [picker setToRecipients:toRecipients]; NSString *emailBody = @"It is not working!"; [picker setMessageBody:emailBody isHTML:YES]; [mailComposer presentModalViewController:picker animated:NO]; [picker release]; } - (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { switch (result) { case MFMailComposeResultCancelled: break; case MFMailComposeResultSaved: break; case MFMailComposeResultSent: break; case MFMailComposeResultFailed: break; default: break; } [mailComposer dismissModalViewControllerAnimated:NO]; [[UIApplication sharedApplication] setStatusBarOrientation:CCDeviceOrientationLandscapeLeft animated:NO]; CCDirector *director = [CCDirector sharedDirector]; [director.openGLView setUserInteractionEnabled:YES]; [director startAnimation]; [director resume]; [mailComposer.view.superview removeFromSuperview]; } -(void)launchMailAppOnDevice { NSString *recipients = @"mailto:[email protected]?&subject=Hello!"; NSString *body = @"&body=It is not working"; NSString *email = [NSString stringWithFormat:@"%@%@", recipients, body]; email = [email stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:email]]; } - (void)dealloc { [super dealloc]; } @end

    Read the article

  • how to delete contents from plist programmatically ?

    - by srikanth rongali
    I have a plist file. I want to delete the data from the plist. How can I do it programmatically ? My Plist have an array cells. cells is filled by dictionaries . Each dictionary is filled by string. I used the following way. NSString* plistPath1 = [[NSBundle mainBundle] pathForResource:@"details" ofType:@"plist"]; [cells removeObjectAtIndex:[clickedButtonPath row]]; NSMutableArray *array1 = [[NSMutableArray alloc] initWithCapacity:4]; array1 = cells; [array1 writeToFile:plistPath1 atomically: YES]; But the plist is not taking the changes. Thank you.

    Read the article

  • how to create a rounded transparent rectangle by using cocoa touch ?

    - by srikanth rongali
    Hi, I need to create a rounded rectangular box in which there will be 6 buttons in iPhone application. And the rectangular box is transparent. Each button have an image and text. And they are also transparent. ( Here transparent means we can see the background image of the box. Sorry for my vocabulary.) I could not get how to start it. I thought of the following one but, By using core graphics draw the outside rounded rectangle and then draw inside rectangles like 2x3 grid. Can I make with this ? Are there any good and easy methods than this. Please give me some idea how to start over with ? Thank you.

    Read the article

  • How to set probability for a targetSprite shooting accuracy in shooting game ?

    - by srikanth rongali
    Hi, My code is ion cocos2D. I have written code for generating the bullets from the enemy gun for every 0.3seconds. The enemySprite is in right side of the screen in (land scape mode) at winSize.height/2. the bullet starts from the same point and reach the player's end. I used rand() to generate y-coordinate for the bullet to hit on player side. Now, if the bullet bounded rectangle meets the player bounded rectangle the enemy won. If it misses enemy shoots again after 0.3 seconds. Every thing is fine up to here for me. But I have 10 enemies and each have accuracy of hitting player of probabilities ranging from 0.80 to 1.0. First enemy probability is .80 and 10 enemy's is 1.0. How can I adjust the probability for enemy such that it runs according to its probability. Player also hits the enemy.

    Read the article

1 2 3 4 5 6 7  | Next Page >