Search Results

Search found 3754 results on 151 pages for 'ios simulator'.

Page 31/151 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • iPhone Simulator Error: dyld: Symbol not found: _objc_collect_if_needed

    - by freespace
    I have been seeing the following error message a lot whenever I run something in the simulator: dyld: Symbol not found: _objc_collect_if_needed Referenced from: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation Expected in: /usr/lib/libobjc.A.dylib in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation I am running XCode 3.2.2 on OS X 10.6.3, and have reinstalled the SDK twice with no avail. This error makes running any code on the simulator something of a Russian Roulette, but with 5 out of 6 chambers loaded. I have checked the files mentioned in the error message, and they all checkout as being present. This sometimes go away if I restart XCode. Other times I have to logout, or even restart. And sometimes nothing works. I have googled this, even tried apple's developer forums. Other than a reference to this in the MonoTouch list, this bug appears to be completely unknown otherwise. Anything help would be greatly appreciated - this is a real PITA. Cheers, Steve

    Read the article

  • Debuging to simulator crashes with "exited with status 5" unless I debug

    - by tigermain
    For some reason the app I am working on has very bad PMT! Literally! Most of the time I cannot debug using the simulator without putting a breakpoint in my AppDelegate. If I don't it exists with "status 5". If I put a break point in and simple continue it works perfectly well, it also works if I run the app in the simulator when not connected to the GDB. I have tried the source on a second machine with exactly the same results. I dont have this issue building to the device?!?!?! Thanks

    Read the article

  • Playing a .TS file on iOS

    - by Jonathan Grynspan
    We're working with some hardware that produces files in the .TS format, and we'd like to play them on an iOS device. (The files are internally consistent with what iOS supports--MPEG-4 video, AAC audio.) We've been investigating three options so far: Roll our own integrated HTTP Live Streaming server and serve up a faux M3U8 playlist from within the app. This... doesn't seem to want to play nice, and we've had mixed luck actually getting the .TS files to play on devices. Unwrap the MPEG-4 and AAC data from the TS file and re-wrap it as MP4. This, I'm told, is exceedingly difficult to do, and I haven't found anything useful online that could shed light on how to do it. We've got code in the pipeline to do it but it won't be ready until long after we need it. If we could do it, I could easily subclass NSURLProtocol and have it working within a matter of hours minutes. Use FFmpeg to implement option #2. FFmpeg seems like a possible solution but it isn't configured to build for iOS and I don't have the background to get it working (whereas the rest of our engineers don't have the Apple background needed.) I think #2 is our best bet, but as I don't know the ins and outs of MPEG-2 TS and MPEG-4, I don't have the ability to put it together myself. Does anybody have any insight into this problem? Perhaps some experience playing local TS files on iOS, or some tips on converting from TS to MP4?

    Read the article

  • Invoking [SKProductsRequest start] hangs on iOS 4.0

    - by figelwump
    Encountering an issue with SKProductsRequest that is specific to iOS 4.0. The problematic code: - (void)requestProductData { NSSet *productIdentifiers = [NSSet setWithObjects:kLimitedDaysUpgradeProductId, kUnlimitedUpgradeProductId, nil]; self.productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:productIdentifiers]; self.productsRequest.delegate = self; [self.productsRequest start]; } - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response { NSLog(@"didReceiveResponse"); } When [SKProductsRequest start] is invoked, the productsRequest:didReceiveResponse: delegate method is never invoked; further, the entire app hangs and is completely unresponsive to input. Obviously, this is a huge issue for our iOS 4.0 users as it not only breaks payments but makes the app completely unusable. Some other things to note: this only happens on iOS 4.0; iOS 4.2, 3.x are fine. Also: if the delegate is not set on the SKProductsRequest (i.e. comment out the line "self.productsRequest.delegate = self;"), the app doesn't hang (but of course in that case we have no way of getting the product info). Also, the problem still reproduces with everything stripped out of the productsRequest:didReceiveResponse: callback (that method never actually gets called). Finally, if the productIdentifiers NSSet object is initialized to an empty set, the hang doesn't occur. Has anybody else experienced this? Any ideas/thoughts on what could be going on here, and how we might be able to work around this?

    Read the article

  • iOS6 Twitter integration

    - by Peter Warbo
    There seems to be a difference between the iPhone simulator and actual device when checking if Twitter is available. I check if a Twitter account is setup by using this code: [SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]; In the simulator there is a nice UIAlertView informing the user that there are no Twitter accounts setup and two buttons one for Settings and one for Cancel. However when I run my app on my device it will not show the above UIAlertView. Why is that? And how can I catch what button is tapped in the above UIAlertView (since I did not instantiate it?) This is what it looks like on the simulator:

    Read the article

  • Universal iPhone/iPad Windows-based app with Core Data crashes on iPhone SDK 4 beta 3

    - by Tarfa
    Hi all. I installed iPhone OS 4.0 Beta 3. When I create a new Windows-based universal app with Core Data (File New Project Windows-based Application --- select Universal in drop down and check the "Use Core Data for storage" check box) the app launches fine into the iPhone simulator but crashes in the iPad simulator. The console message returned is: dyld: Symbol not found: _OBJC_CLASS_$_NSURL Referenced from: /Users/tarfa/Library/Application Support/iPhone Simulator/3.2/Applications/5BB644DC-9370-4894-8884-BAEBA64D9ED0/Universal.app/Universal Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation I'm stumped. Anyone else experiencing this problem?

    Read the article

  • Date since 1600 to NSDate?

    - by Steven Fisher
    I have a date that's stored as a number of days since January 1, 1600 that I need to deal with. This is a legacy date format that I need to read many, many times in my application. Previously, I'd been creating a calendar, empty date components and root date like this: self.gregorian = [[[NSCalendar alloc] initWithCalendarIdentifier: NSGregorianCalendar ] autorelease]; id rootComponents = [[[NSDateComponents alloc] init] autorelease]; [rootComponents setYear: 1600]; [rootComponents setMonth: 1]; [rootComponents setDay: 1]; self.rootDate = [gregorian dateFromComponents: rootComponents]; self.offset = [[[NSDateComponents alloc] init] autorelease]; Then, to convert the integer later to a date, I use this: [offset setDay: theLegacyDate]; id eventDate = [gregorian dateByAddingComponents: offset toDate: rootDate options: 0]; (I never change any values in offset anywhere else.) The problem is I'm getting a different time for rootDate on iOS vs. Mac OS X. On Mac OS X, I'm getting midnight. On iOS, I'm getting 8:12:28. (So far, it seems to be consistent about this.) When I add my number of days later, the weird time stays. OS | legacyDate | rootDate | eventDate ======== | ========== | ==========================|========================== Mac OS X | 143671 | 1600-01-01 00:00:00 -0800 | 1993-05-11 00:00:00 -0700 iOS | 143671 | 1600-01-01 08:12:28 +0000 | 1993-05-11 07:12:28 +0000 In the previous release of my product, I didn't care about the time; now I do. Why the weird time on iOS, and what should I do about it? (I'm assuming the hour difference is DST.) I've tried setting the hour, minute and second of rootComponents to 0. This has no impact. If I set them to something other than 0, it adds them to 8:12:28. I've been wondering if this has something to do with leap seconds or other cumulative clock changes. Or is this entirely the wrong approach to use on iOS?

    Read the article

  • iOS 5 Hanging on ASIHTTPRequests

    - by Tareq
    So I have an app that runs on iOS 3.2 - 4.x. It uses ASIHTTPRequest to make all the REST API calls. Ever since my team and I upgraded three of our iPhone 4's to iOS 5, The app will hang and show the ActivityIndicator indefinitely. I looked at the server logs and the requests aren't hitting the server. However, if I press the iPhone home button then open the app again, the request will go through and I will receive the data, business as normal. For some reason the requests are never triggered until I reopen the app. Another weird tidbit, the app works in Xcode 4.2 and the iPhone simulator. The app also works on an iPad2 with iOS 5 (the app is iPhone only). Would this be an ASIHTTPRequest issue? Not too sure how to pinpoint the issue since there is no crash and only happens on the phone. Any insight would be much appreciated! Thanks.

    Read the article

  • Building MobileVLCKit from git.videolan.org repository on macOsX with XCode

    - by ztepsic
    I would like to make an application for iOS(iPhone and iPad) that can play streaming videos through RTSP protocol (that includes mms). I imagined to achive a specified application using VLC player or libVLC library. On the official vlc git repository (http://git.videolan.org/?p=vlc.git;a=tree) in projects/macosx/framework/ folder there is xcode project MobileVLCKit.xcodeproj for which I assume that is a somewhat usable VLC framework for iOS. Now the problem is that I can't/don't know how to build this project. When I try to build MobileVLCKit.xcodeproj I get an error that says it can't find files inside extras/contrib/hosts/i686-apple-darwin10/ios/ folder. I have looked within that folder (extras/contrib) and managed to create folder (with files) extras/contrib/hosts/i686-apple-darwin10/ with make, but there is no ios folder. So, does anybody knows how to successfully build MobileVLCKit?

    Read the article

  • Deployment error

    - by Rakesh
    Hi all i am getting deployment error when i try to run my app in the device. it says "no provisioning ios devices are connected". I have ios sdk 4.1 installed on my mac and in the device the version of ios is 4.2. I have conected my device to Mac. Can i run my app under these conditions or i need to update ios sdk to 4.2 in Mac also. if yes then is there any update available so that i can update my sdk from version 4.1 to 4.2 or i have to download the whole new version of 4.2 (almost 3.5 GB). Please help.

    Read the article

  • Do new Apple SDKs patch previous releases?

    - by Francisco Garcia
    A new iPhone will be soon out there along a new iOS release. Sooner or later there will also be a Xcode upgrade with the SDK for iOS 6 Does Apple do any type of bugfix on previous SDKs or are bugfixes just solved on new releases? As an example: Core Data with iCloud still have some issues but it is getting better over time. Let's say I have an app that really depends on that combo. I would require iOS6, however not all users upgrade the handsets. Ideally an app compiled with a newer XCode release could patch some error on previous SDKs if the target is set to an older iOS release. Should I expect that a project compiled with future SDK releases to work better on devices running on older iOS versions? will be some SDKs bugfixes backported? I understand that there are some bugs that cannot be fixed without an iOS update on the client. Also that it is a lot of work (and unlikely) to backport bugfixes. I am just wondering what is the normal release policy of Apple.

    Read the article

  • Launching a Facebook page from an iPhone app via QR code

    - by user1655186
    I'm trying to create a QR code that launches a Facebook page from the app, rather than the browser on both Android and iOS. Creating the code with fb://page/<page id>, works perfectly on an Android. This was also supposed to work with iOS's Facebook app, but I think since Facebook updated their app recently from a HTML5 version to a fully native iOS app, that functionality has stopped working. It indeed opens the Facebook app, but it does not go to the page. Has anyone else seen this happen since the app was updated a few weeks ago? And what string would I have to use to create a working QR Code for iOS's Facebook app?

    Read the article

  • IOS 7 Table cell not show

    - by user2855572
    I am getting very strange problem in my app. I am creating table view cell dynamically.My problem is that textlable is not showing. Code was working on ios 5 and ios 6 but not working on ios 7 it is giving problem.Anybody help me NSString *Str=[NSString stringWithFormat:@"%@",[dateCalcuArray objectAtIndex:indexPath.row]]; Str=[Str stringByReplacingOccurrencesOfString:@"(" withString:@""]; Str=[Str stringByReplacingOccurrencesOfString:@")" withString:@""]; Str=[Str stringByReplacingOccurrencesOfString:@"\"" withString:@""]; ipad_Cell.datelbl.text=Str; ipad_Cell.datelbl.textColor=[UIColor whiteColor];

    Read the article

  • importing a VCard in the address book , objective C [migrated]

    - by user1044771
    I am designing a QR code reader, and it needs to detect and import contact cards in vCard format. is there a way to add the card data to the system Address Book directly, or do I need to parse the vCard myself and add each field individually? I will be getting the VCArd in a NSString format I tried the code below (from a different post) and didn't work -(IBAction)saveContacts{ NSString *vCardString = @"vCardDataHere"; CFDataRef vCardData = (__bridge_retained CFDataRef)[vCardString dataUsingEncoding:NSUTF8StringEncoding]; ABAddressBookRef book = ABAddressBookCreate(); ABRecordRef defaultSource = ABAddressBookCopyDefaultSource(book); CFArrayRef vCardPeople = ABPersonCreatePeopleInSourceWithVCardRepresentation(defaultSource, vCardData); for (CFIndex index = 0; index < CFArrayGetCount(vCardPeople); index++) { ABRecordRef person = CFArrayGetValueAtIndex(vCardPeople, index); ABAddressBookAddRecord(book, person, NULL); CFRelease(person); } CFRelease(vCardPeople); CFRelease(defaultSource); ABAddressBookSave(book, NULL); CFRelease(book); } I have searched a bit and fixed the code and here how it looks like it doesn t crash anymore but it doesn t save the VCard (NSString format) in the address book , any clues ?

    Read the article

  • How to build Open JavaFX for Android.

    - by PictureCo
    Here's a short recipe for baking JavaFX for Android dalvik. We will need just a few ingredients but each one requires special care. So let's get down to the business.  SourcesThe first ingredient is an open JavaFX repository. This should be piece of cake. As always there's a catch. You probably know that dalvik is jdk6 compatible  and also that certain APIs are missing comparing to good old java vm from Oracle.  Fortunately there is a repository which is a backport of regular OpenJFX to jdk7 and going from jdk7 to jdk6 is possible. The first thing to do is to clone or download the repository from https://bitbucket.org/narya/jfx78. Main page of the project says "It works in some cases" so we will presume that it will work in most cases As I've said dalvik vm misses some APIs which would lead to a build failures. To get them use another compatibility repository which is available on GitHub https://github.com/robovm/robovm-jfx78-compat. Download the zip and unzip sources into jfx78/modules/base.We need also a javafx binary stubs. Use jfxrt.jar from jdk8.The last thing to download are freetype sources from http://freetype.org. These will be necessary for native font rendering. Toolchain setup I have to point out that these instructions were tested only on linux. I suppose they will work with minimal changes also on Mac OS. I also presume that you were able to build open JavaFX. That means all tools like ant, gradle, gcc and jdk8 have been installed and are working all right. In addition to this you will need to download and install jdk7, Android SDK and Android NDK for native code compilation.  Installing all of them will take some time. Don't forget to put them in your path. export ANDROID_SDK=/opt/android-sdk-linux export ANDROID_NDK=/opt/android-ndk-r9b export JAVA_HOME=/opt/jdk1.7.0 export PATH=$JAVA_HOME/bin:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools:$ANDROID_NDK FreetypeUnzip freetype release sources first. We will have to cross compile them for arm. Firstly we will create a standalone toolchain for cross compiling installed in ~/work/ndk-standalone-19. $ANDROID_NDK/build/tools/make-standalone-toolchain.sh  --platform=android-19 --install-dir=~/work/ndk-standalone-19 After the standalone toolchain has been created cross compile freetype with following script: export TOOLCHAIN=~/work/freetype/ndk-standalone-19 export PATH=$TOOLCHAIN/bin:$PATH export FREETYPE=`pwd` ./configure --host=arm-linux-androideabi --prefix=$FREETYPE/install --without-png --without-zlib --enable-shared sed -i 's/\-version\-info \$(version_info)/-avoid-version/' builds/unix/unix-cc.mk make make install It will compile and install freetype library into $FREETYPE/install. We will link to this install dir later on. It would be possible also to link openjfx font support dynamically against skia library available on Android which already contains freetype. It creates smaller result but can have compatibility problems. Patching Download patches javafx-android-compat.patch + android-tools.patch and patch jfx78 repository. I recommend to have look at patches. First one android-compat.patch updates openjfx build script, removes dependency on SharedSecret classes and updates LensLogger to remove dependency on jdk specific PlatformLogger. Second one android-tools.patch creates helper script in android-tools. The script helps to setup javaFX Android projects. Building Now is time to try the build. Run following script: JAVA_HOME=/opt/jdk1.7.0 JDK_HOME=/opt/jdk1.7.0 ANDROID_SDK=/opt/android-sdk-linux ANDROID_NDK=/opt/android-ndk-r9b PATH=$JAVA_HOME/bin:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools:$ANDROID_NDK:$PATH gradle -PDEBUG -PDALVIK_VM=true -PBINARY_STUB=~/work/binary_stub/linux/rt/lib/ext/jfxrt.jar \ -PFREETYPE_DIR=~/work/freetype/install -PCOMPILE_TARGETS=android If everything went all right the output is in build/android-sdk Create first JavaFX Android project Use gradle script int android-tools. The script sets the project structure for you.   Following command creates Android HelloWorld project which links to a freshly built javafx runtime and to a HelloWorld application. NAME is a name of Android project. DIR where to create our first project. PACKAGE is package name required by Android. It has nothing to do with a packaging of javafx application. JFX_SDK points to our recently built runtime. JFX_APP points to dist directory of javafx application. (where all application jars sit) JFX_MAIN is fully qualified name of a main class. gradle -PDEBUG -PDIR=/home/user/work -PNAME=HelloWorld -PPACKAGE=com.helloworld \ -PJFX_SDK=/home/user/work/jfx78/build/android-sdk -PJFX_APP=/home/user/NetBeansProjects/HelloWorld/dist \ -PJFX_MAIN=com.helloworld.HelloWorld createProject Now cd to the created project and use it like any other android project. ant clean, debug, uninstall, installd will work. I haven't tried it from any IDE Eclipse nor Netbeans. Special thanks to Stefan Fuchs and Daniel Zwolenski for the repositories used in this blog post.

    Read the article

  • How do I repeat a texture with GLKit?

    - by Synopfab
    I am using GLKit in order to show textures on my project. The code is like this: -(void)setTextureImage:(UIImage *)image { NSError *error; texture = [GLKTextureLoader textureWithCGImage:image.CGImage options:nil error:&error]; if (error) { NSLog(@"Error loading texture from image: %@",error); } } effect.texture2d0.envMode = GLKTextureEnvModeReplace; effect.texture2d0.target = GLKTextureTarget2D; effect.texture2d0.name = texture.name; glEnableVertexAttribArray(GLKVertexAttribTexCoord0); glVertexAttribPointer(GLKVertexAttribTexCoord0, 2, GL_FLOAT, GL_FALSE, 0, self.textureCoordinates); Now I want to repeat this texture on a rectangle. Is there any way use GLKit for this behavior? I've tried to use opengl function in addition to the glkit ones, but it raises errors: glEnable(GL_TEXTURE_2D); glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT ); glBindTexture( GL_TEXTURE_2D, texture.name ); 2011-11-09 20:10:28.614 **[16309:207] GL ERROR: 0x0500 2011-11-09 20:10:30.840 **[16309:207] Error loading texture from image: Error Domain=GLKTextureLoaderErrorDomain Code=8 "The operation couldn’t be completed. (GLKTextureLoaderErrorDomain error 8.)" UserInfo=0x68545c0 {GLKTextureLoaderGLErrorKey=1280, GLKTextureLoaderErrorKey=OpenGL error}

    Read the article

  • Sprite Kit - containsPoint for SKPhysicsBody?

    - by gj15987
    I have a ball bouncing around the screen. I can pick it up and drag it onto a "bucket". When my touches finish, I use the containsPoint function to check and see if I have dropped the ball onto the bucket. This works fine, however, I actually want to check whether the ball is dropped onto the bucket node's physics body because my "bucket" is actually just an oval, and so I've applied a physics body which is the same shape as the oval, so that the white space around the oval isn't included in the physics simulation. I can't seem to find a "containsPoint" function for physics bodies. Can anyone advise on how I'd check for this? To summarise, I want to drop a node, onto a specific part of another node (or its physics body) and trigger an event. Thanks in advance.

    Read the article

  • How to move a sprite on a slope in chipmunk Spacemanager

    - by Anil gupta
    I have used one polygon shape image (terrain) in my game. It's just like a mountain, and now I want to move the tanker on a mountain path from one side to the other and then turn around at the edge of the screen and go back. I don't understand the method to move the tanker on the slope (image) path in chipmunk spacemanager. When collision detection happens like that, if any bomb falls on the slope (image of mountain) then I want to do a little damage to the slope (image of mountain) like this video.

    Read the article

  • App Store: Profitability for Game Developers

    - by Bunkai.Satori
    Recent days, I've been spending significant time in discovering chances of profitability of AppStore for developers. I have found many articles. Some of them are highly optimistic, while other are extremely skeptical. This article is extremely skeptical. It even claims to have backed its conclusions by objective sales numbers. This is another pesimistic article saying that games developed by single individuals get 20 downloads a day. Can I kindly ask to clarify from business viewpoint whether average developers publishing games and software on AppStore can cover their living expenses, even, whether they can become profitable? Is it achievable to generate revenues of 50.000 USD yearly on AppStore for a single developer? I would like to stay as realistic as possible. Despite the question might look subjective, a good business man will be able to esitmate chances for profitability and prosperity within AppStore.

    Read the article

  • App Store: Profitability for Game Developers

    - by Bunkai.Satori
    Recent days, I've been spending significant time in discovering chances of profitability of AppStore for developers. I have found many articles. Some of them are highly optimistic, while other are extremely skeptical. This article is extremely skeptical. It even claims to have backed its conclusions by objective sales numbers. This is another pesimistic article saying that games developed by single individuals get 20 downloads a day. Can I kindly ask to clarify from business viewpoint whether average developers publishing games and software on AppStore can cover their living expenses, even, whether they can become profitable? Is it achievable to generate revenues of 50.000 USD yearly on AppStore for a single developer? I would like to stay as realistic as possible. Despite the question might look subjective, a good business man will be able to esitmate chances for profitability and prosperity within AppStore.

    Read the article

  • How To show document directory save image in thumbnail in cocos2d class

    - by Anil gupta
    I have just implemented multiple photo selection from iphone photo library and i am saving all selected photo in document directory every time as a array, now i want to show all saved images in my class from document directory as a thumbnail, i have tried some logic but my game getting crashing, My code is below. Any help will be appreciate. Thanks in advance. -(id) init { // always call "super" init // Apple recommends to re-assign "self" with the "super" return value if( (self=[super init])) { CCSprite *photoalbumbg = [CCSprite spriteWithFile:@"photoalbumbg.png"]; photoalbumbg.anchorPoint = ccp(0,0); [self addChild:photoalbumbg z:0]; //Background Sound // [[SimpleAudioEngine sharedEngine]playBackgroundMusic:@"Background Music.wav" loop:YES]; CCSprite *photoalbumframe = [CCSprite spriteWithFile:@"photoalbumframe.png"]; photoalbumframe.position = ccp(160,240); [self addChild:photoalbumframe z:2]; CCSprite *frame = [CCSprite spriteWithFile:@"Photo-Frames.png"]; frame.position = ccp(160,270); [self addChild:frame z:1]; /*_____________________________________________________________________________________*/ CCMenuItemImage * upgradebtn = [CCMenuItemImage itemFromNormalImage:@"AlbumUpgrade.png" selectedImage:@"AlbumUpgrade.png" target:self selector:@selector(Upgrade:)]; CCMenu * fMenu = [CCMenu menuWithItems:upgradebtn,nil]; fMenu.position = ccp(200,110); [self addChild:fMenu z:3]; NSError *error; NSFileManager *fM = [NSFileManager defaultManager]; NSString *documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]; NSLog(@"Documents directory: %@", [fM contentsOfDirectoryAtPath:documentsDirectory error:&error]); NSArray *allfiles = [fM contentsOfDirectoryAtPath :documentsDirectory error:&error]; directoryList = [[NSMutableArray alloc] init]; for(NSString *file in allfiles) { NSString *path = [documentsDirectory stringByAppendingPathComponent:file]; [directoryList addObject:file]; } NSLog(@"array file name value ==== %@", directoryList); CCSprite *temp = [CCSprite spriteWithFile:[directoryList objectAtIndex:0]]; [temp setTextureRect:CGRectMake(160.0f, 240.0f, 50,50)]; // temp.anchorPoint = ccp(0,0); [self addChild:temp z:10]; for(UIImage *file in directoryList) { // NSData *pngData = [NSData dataWithContentsOfFile:file]; // image = [UIImage imageWithData:pngData]; NSLog(@"uiimage = %@",image); // UIImage *image = [UIImage imageWithContentsOfFile:file]; for (int i=1; i<=3; i++) { for (int j=1;j<=3; j++) { CCTexture2D *tex = [[[CCTexture2D alloc] initWithImage:file] autorelease]; CCSprite *selectedimage = [CCSprite spriteWithTexture:tex rect:CGRectMake(0, 0, 67, 66)]; selectedimage.position = ccp(100*i,350*j); [self addChild:selectedimage]; } } } } return self; }

    Read the article

  • How do I break an image into 6 or 8 pieces of different shapes?

    - by Anil gupta
    I am working on puzzle game, where the player can select an image from iPhone photo gallery. The selected image will save in puzzle page and after 3 second wait the selected image will be broken into 6 or 8 parts of different shapes. Then player will arrange these broken parts of images to make the original image. I am not getting idea how to break the image and merged so that player arrange the broken part. I want to break image like this below frame. I am developing this game in cocos2d.

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >