//NsMutableArray
//Received memory warning, while using animations in UIImageview like;
self.imageArray = [[NSMutableArray alloc] initWithCapacity:IMAGE_COUNT];
// Build array of images, cycling through image names
if (![self.imageArray count]>0) {
for (int i = 0; i < IMAGE_COUNT; i++){
if (i<10) {
[self.imageArray addObject:[UIImage imageNamed:[NSString stringWithFormat:@"image000%d.jpg", i]]];
}else {
[self.imageArray addObject:[UIImage imageNamed:[NSString stringWithFormat:@"image00%d.jpg", i]]];
}
}
}
/////Received memory warning, while using animations in UIImageview
self.animatedImages.animationImages = [NSArray arrayWithArray:self.imageArray];
[self.imageArray release];
self.imageArray=nil;
// One cycle through all the images takes 1.5 seconds
self.animatedImages.animationDuration = 0.8;
// Repeat forever
self.animatedImages.animationRepeatCount = -1;
[self.animatedImages startAnimating];
Received memory warning, while using animations in UIImageview like [smyImageView startAnimating];
1.2k Views Asked by Wish At
1
There are 1 best solutions below
Related Questions in IPHONE
- UIWebView Screen Fitting Issue
- ios responsive design not working (too wide in portrait orientation)
- Setting View orientation to portrait is ignored
- How do I add custom cells to TableView in Swift?
- UIWebView not loading URL in simulator
- What is the limit for number of subscribers to a stream(publisher's) in opentok/tokbox iOS SDK?
- How to generate request format for WCF web service method for Mac and iPhone
- Difference between gethostname() and [NSProcessInfo hostName]?
- How to force close ipad/iphone keypad when input element is not focused using JS?
- iOS app rejected because of in-app purchase
- iOS coordinates for iPad and iPhone game using spritekit
- What is the best practice when making a storyboard for iPhone and iPad?
- Labels properties changing in Xcode
- Terminating app due to uncaught exception
- Exchange plist data between 2 iPad using iCloud
Related Questions in MEMORY-MANAGEMENT
- Calling Dealloc method in sprite kit
- Allocating memory for pointers inside structures in functions
- Beginner iOS memory management
- Deleting a dynamically allocated 2D array
- DataTable does not release memory
- how to resize image properly without memory warning
- Application Verifier limits Heap Allocations by default?
- C++ assign const reference to instance variable (memory issues?)
- What memory issues may arise from a single page JavaScript/AJAX application when kept open over a period of months?
- How to increase PHP memory_limit in Debian Jessie?
- Is this correct point to free char*
- Using parse.com and having allocation memory issue
- Qt object ownership when using lambda as slot
- Any ideas why one object is not deallocated in objective-c ARC
- How do I set a buffer in a possibly recursive procedure?
Related Questions in XCODE4
- What could be the cause of this if condition getting skipped even the condition inside is True?
- Inheritance and protected attribute
- Link error missing vtable
- Newton method for computing an inverse
- Xcode iOS Build - copy only specific sub-folders as Bundle Resources
- New iOS project, free hosted repository: Xcode 4 or Xcode 3.2?
- symbol(s) not found for architecture i386
- Deleting/Removing Group in Xcode
- In Xcode 4 GM, how do I turn on LLDB? All I see is GDB
- Upgrading to xcode 4 error No architectures to compile for
- XCode 4 User Script
- In XCode 4, how do you change the number of tabs in a UiTabBarViewController?
- if(self = [super init]) - LLVM warning! How are you dealing with it?
- "Run > Stop on Objective-C exception" in Xcode 4?
- Xcode 4 and GData compile problem
Related Questions in IPHONE-SDK-4.1
- How to Rotate UIButton by tap and hold (hold - rotate by finger)
- how to draw route in MapView
- How to handle JSON response using SBJSON iPhone?
- iphone app crashes: work fine in development but when downloaded from itunes it crashes
- How to parse the string using TBXML in iphone sdk?
- Received memory warning, while using animations in UIImageview like [smyImageView startAnimating];
- THEOS compilation errors
- ASIFormDataRequest login php. help needed
- iphone sdk 4.1 Is it possible for a background application to get cellular call events?
- in ipad simulator how to set screen size to 1x 2x format
- UIPageControl : How to dynamically load controls in View in iPhone SDK?
- how to change url of uiwebview when button is clicked?
- how to align UIControls in iphone Dynamically?
- How to update a table view from another view
- Unit Testing in iphone i got below error
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Replace
with
because the API imageNamed: cache data in memory.