Daily Archives

Articles indexed Friday October 26 2012

Page 10/16 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Send less Server Data with "AFK"

    - by Oliver Schöning
    I am working on a 2D (Realtime) MultiPlayer Game. With Construct2 and a Socket.IO JavaScript Server. Right now the code does not include the Array for each Player. var io = require("socket.io").listen(80); var x = 10; io.sockets.on("connection", function (socket) { socket.on("message", function(data) { x = x+1; }); }); setInterval(function() { io.sockets.emit("message", 'Pos,' + x); },100); I noticed a very annoying problem with my server today. It sends my X Coordinates every 100 milliseconds. The Problem was, that when I went into another Browser Tab, the Browser stopped the Game from running. And when I went back, I think the Game had to run through all the packages. Because my Offline Debugging Button still worked immediately and the Online Button only responded after some seconds. So then I changed my Code so that it would only send out an update when it received a player Input: var io = require("socket.io").listen(80); var x = 10; io.sockets.on("connection", function (socket) { socket.on("message", function(data) { x = x+1; io.sockets.emit("message", 'Pos,' + x); }); }); And it Updated Immediately, even when I had been inactive on the Browser Tab for a long time. Confirming my suspicion that it had to get through all the data. Confirm Please! It would be insane to only send information on Client Input in a Real Time Game. But how would I write a AFK function? I would think it is easier to run a AFK Boolean Loop on the Server. Here is what I need help for: playerArray[Me] if ( "Not Given any Input for X amount of Seconds" ) { "Don't send Data" } else { "Send Data" }

    Read the article

  • forward rendering and multiple shadow maps

    - by Irbis
    I have two light sources on my scene. I created two fbo's which store depth textures for these lights. A render loop looks like this: bind fbo1 save depth values for first light unbind fbo1 bind fbo2 save depth values for second light unbind fbo2 enable additive blending bind first depth texture render scene bind second depth texture render scene disable additive blending For one light source the program works fine. For many light sources I use an additive blending to acumulate lighting results but then some objects become transparent (for example when an object which is further away from the camera is drawn before an object which is closer to the camera). How to resolve that problem ? How should I accumulate lighting effects for many light sources (many shadow maps) ? P.S. I use OpenGL/GLSL 3.3+

    Read the article

  • Sprite.js surface background

    - by user1086671
    I'm making a tile-based game using Sprite.js. It is not easy to redraw every tile each frame, so I tried to make a scrolling surface background. There is an example here http://batiste.dosimple.ch/sprite.js/tests/test_scrolling.html The example works, but it seems like ScrollingSurface.update is buggy or there is something I'm missing. What I tried to do is to draw 5x5 tiles and after 5 seconds draw another 5x5 tiles near the first ones. But it draws only the first ones. And surface.update() only updates the position of surface. Here is my code https://github.com/Sektoid/sprite.js/blob/master/tests/test_scrolling.html (You need also to set this.divider = 1.0 in scrolling.js to avoid drawing the same tiles 4 times.) There aren't any sprite.js-forums like with the other sprite- and game-engines have, so I'm asking here.

    Read the article

  • Copies of GameScene created when called additional times

    - by Orin MacGregor
    I have a game with a level select managed by a SceneManager, which basically just uses ReplaceScene. The first time I load a level everything works fine. On subsequent calls, for example: completing the level and continuing to the next, things blow up. The level loads fine, but when I try to pan the map or try to move the player the game crashes. Debugging through I found that there are multiple occurrences of self and related children like player and mapLayer. As a test, I put this code in my ccTouchesBegan: NSLog(@"test %i", [self retainCount]); The first time a level is loaded, it gives: test 2 The second time I load a level it gives: test 2 test 1 as in it spits out both values by looping through twice, not just appending an output to the last. It continues with this pattern for each subsequent load. So the third time will give 2 1 1. Particular code that causes the game to crash involve calling _tileMap.tileSize because there is a second GameScene with a tileMap that was supposedly destroyed, so it has tileSize and mapSize of 0. I noticed dealloc doesn't really ever get called, so I tried to manage some things with -(void) onExit -(void) onExit { [self unscheduleAllSelectors]; [_player stopAllActions]; //stop any animations just in case. normally handled in ccTouchesEnded [self removeAllChildrenWithCleanup:YES]; } I never replace the GameScene while I'm in a GameScene; if the level is completed it goes to a GameOver scene, or I use a back button that goes to the LevelSelect scene. This is [the relevant parts of] my init, in case something like the adding of children matters: -(id) init { _mapLayer = [CCLayer node]; //load data for level GameData *gameData = [GameDataParser loadData]; int selectedChapter = gameData.selectedChapter; int selectedLevel = gameData.selectedLevel; Levels *chapterLevels = [LevelParser loadLevelsForChapter:selectedChapter]; //loop until we get selected level, then do stuff for (Level *level in chapterLevels.levels) { if (level.number == selectedLevel) { //load the level map _tileMap = [CCTMXTiledMap tiledMapWithTMXFile:level.file]; } } _background = [_tileMap layerNamed:@"Background"]; _foreground = [_tileMap layerNamed:@"Foreground"]; _meta = [_tileMap layerNamed:@"Meta"]; _meta.visible = NO; //initialize Spawn Point object and place player there CCTMXObjectGroup *objects = [_tileMap objectGroupNamed:@"Objects"]; NSAssert(objects != nil, @"'Objects' object group not found"); NSMutableDictionary *spawnPoint = [objects objectNamed:@"SpawnPoint"]; NSAssert(spawnPoint != nil, @"SpawnPoint object not found"); int x = [[spawnPoint valueForKey:@"x"] intValue] / retinaScaling; int y = [[spawnPoint valueForKey:@"y"] intValue] / retinaScaling; //setup animations [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"MouseRightAnim_24x21.plist"]; CCSpriteBatchNode *spriteSheet = [CCSpriteBatchNode batchNodeWithFile:@"MouseRightAnim_24x21.png"]; [_mapLayer addChild:spriteSheet z:1]; NSMutableArray *rightAnimFrames = [NSMutableArray array]; for(int i = 1; i <= 3; ++i) { [rightAnimFrames addObject: [[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName: [NSString stringWithFormat:@"MouseRight%d_24x21.png", i]]]; } CCAnimation *rightAnim = [CCAnimation animationWithSpriteFrames:rightAnimFrames delay:0.1f]; self.player = [CCSprite spriteWithSpriteFrameName:@"MouseRight2_24x21.png"]; _player.position = ccp(x, y); self.rightAction = [CCRepeatForever actionWithAction:[CCAnimate actionWithAnimation:rightAnim]]; rightAnim.restoreOriginalFrame = NO; [spriteSheet addChild:_player]; //get map size in pixels mapHeight = _tileMap.contentSize.height; mapWidth = _tileMap.contentSize.width; //setup defaults //this value works well for the calculation later, trial and error really distance = 150; lastGoodDistance = 150; mapScale = 1; [self setViewpointCenter:_player.position]; [_mapLayer addChild:_tileMap]; [self addChild:_mapLayer z:-1]; self.isTouchEnabled = YES; } return self; } And here's the SceneManager code for replacing scenes: +(void) goGameScene { CCLayer *gameLayer = [GameScene node]; [SceneManager go:gameLayer:[GameHUD node]]; } //this is what every call looks like besides the GameScene one above +(void) goLevelSelect { [SceneManager go:[LevelSelect node]:nil]; } +(void) go:(CCLayer *)layer: (CCLayer *)hudLayer { CCDirector *director = [CCDirector sharedDirector]; CCScene *newScene = [SceneManager wrap:layer:hudLayer]; if ([director runningScene]) { [director replaceScene:newScene]; } else { [director runWithScene:newScene]; } } +(CCScene *) wrap:(CCLayer *)layer: (CCLayer *)hudLayer { CCScene *newScene = [CCScene node]; [newScene addChild: layer]; if (hudLayer != nil) { [newScene addChild: hudLayer z:1]; } return newScene; } Any ideas why I'm getting these fatal artifacts? I'm hoping this isn't considered too localized since it basically combines 3 tutorials that anyone could end up following. (Ray Wenderlich Animations, Tim Roadley Scene Manager, Pan and Zoom with Tiled Maps.

    Read the article

  • Need help revolving a 2D array

    - by Brett
    Pretty much all I'm trying to do is revolve my 2D Array by its container. I'm using this array for a background and I seem to be having problems with it revolving. public class TileTransformer : GridConstants { public Tile[,] Tiles; ContentManager Content; public TileTransformer(ContentManager content) { Content = content; } public Tile[,] Wraping(Tile[,] tiles,Point shift) { Tiles = tiles; for (int x = shift.X; x < 0; x++)//Left shift { for (int X = 0; X < GridWidth; X++) { for (int Y = 0; Y < GridHeight; Y++) { if (X + 1 >GridWidth-1) { Tiles[0, Y].Container =tiles[X, Y].Container; } else { Tiles[X+1, Y].Container =tiles[X, Y].Container; } } } } for (int x = shift.X; x > 0; x--)//right shift { for (int X = 0; X < GridWidth; X++) { for (int Y = 0; Y< GridHeight; Y++) { if (X-1==-1) { Tiles[GridWidth-1, Y].Container =tiles[0, Y].Container; } else { Tiles[X - 1, Y].Container =tiles[X, Y].Container; } } } } for (int y = shift.Y; y > 0; y--)//shift up { for (int X = 0; X < GridWidth; X++) { for (int Y = 0; Y < GridHeight; Y++) { if (Y - 1 == -1) { Tiles[X, GridHeight-1].Container = tiles[X, Y].Container; } else { Tiles[X, Y - 1].Container = tiles[X, Y].Container; } } } } for (int y = shift.Y; y < 0; y++)//shift down { for (int X = 0; X < GridWidth; X++) { for (int Y = 0; Y < GridHeight; Y++) { if (Y + 1 == GridHeight) { Tiles[X, 0].Container = tiles[X, Y].Container; } else { Tiles[X, Y + 1].Container = tiles[X, Y].Container; } } } } return Tiles; } Now the Problems that I'm having is either when I shift up or left it seems the whole array is cleared back to the default state. Also when I'm revolving the array it appears to stretch it upon the sides of the screen that it is shifting towards.

    Read the article

  • Characteristics, what's the inverse of (x*(x+1))/2? [closed]

    - by Valmond
    In my game you can spend points to upgrade characteristics. Each characteristic has a formula like: A) out = in : for one point spent, one pont gained (you spend 1 point on Force so your force goes from 5 to 6) B) out = last level (starting at 1) : so the first point spent earns you 1 point, the next point spent earns you an additional 2 and so on (+3,+4,+5...) C) The inverse of B) : You need to spend 1 point to earn one, then you need to spend 2 to earn another one and so on. I have already found the formula for calculating the actual level of B when points spent = x : charac = (x*(x+1))/2 But I'd like to know what the "reverse" version of B) (usable for C) is, ie. if I have spent x points, how many have I earned if 1 spent gives 1, 1+2=3 gives 2, 1+2+3=6 gives 3 and so on. I know I can just calculate the numbers but I'd like to have the formula because its neater and so that I can stick it in an excel sheet for example... Thanks! ps. I think I have nailed it down to something like charac = sqrt( x*m +k) but then I'm stuck doing number guessing for k and m and I feel I might be wrong anyway as I get close but never hits the spot.

    Read the article

  • Video playback in games - formats & decoding

    - by snake5
    What free / non-restrictive open-source solutions (not GPL) are available for decoding game videos? The requirements are simple: a relatively easy to use C API encoded files must be quite small there must be an application that converts videos from any format (whatever codec is installed on Windows or equivalent amount of internally decoded formats) decoding has to happen fairly quickly bonus points go to file formats that are popular / actively supported and developed

    Read the article

  • Microsoft XNA code sample wont work with blender model

    - by FreakinaBox
    I downloaded this code sample and integrated it into my game http://xbox.create.msdn.com/en-US/education/catalog/sample/mesh_instancing It works with the model that they supplied, but throws and exception whenever I use one of my models. The current vertex declaration does not include all the elements required by the current vertex shader. TextureCoordinate0 is missing. I tried pluging my model into their original source code and same thing. My model is an fbx from blender and has a texture. This is the function that throws the error GraphicsDevice.DrawInstancedPrimitives( PrimitiveType.TriangleList, 0, 0, meshPart.NumVertices, meshPart.StartIndex, meshPart.PrimitiveCount, instances.Length );

    Read the article

  • Best practices with Vertices in Open GL

    - by Darestium
    What is the best practice in regards to storing vertex data in Open GL? I.e: struct VertexColored { public: GLfloat position[]; GLfloat normal[]; byte colours[]; } class Terrian { private: GLuint vbo_vertices; GLuint vbo_normals; GLuint vbo_colors; GLuint ibo_elements; VertexColored vertices[]; } or having them stored seperatly in the required class like: class Terrian { private: GLfloat vertices[]; GLfloat normals[]; GLfloat colors[]; GLuint vbo_vertices; GLuint vbo_normals; GLuint vbo_colors; GLuint ibo_elements; }

    Read the article

  • Load all images from internal application

    - by Dom
    I am trying to load all the .png files from an internal application folder into a list control and I am stuck on exactly how to do it. I have tried httpservice to get the folder and count how many images there are so I can loop through them but I just cant figure that out. File structure -src -(default package) -my application files -icons -all my .png files httpService i tried: <s:HTTPService id="loadAllImages" destination="/icons" result="gotImages(event)" fault="loadAllImagesFault(event)"/> This always results in directory not found. Am I going about this completely wrong? Anyone have a suggestion?

    Read the article

  • Button not moving on my interface

    - by user1500134
    First before I say anything I want to announce that i'm fairly new to this kind of stuff so don't get all super techie on me :D ! Ok so i'm making an app and i'm trying to get a button to move to certain coordinates depending on the screen size of the phone (4, 4S, 5, etc...). I have correct syntax but the button will not move at all. Here is the part of my .m ViewController file... - (void)viewDidLoad { if([[UIScreen mainScreen] respondsToSelector:NSSelectorFromString(@"scale")]) { if ([[UIScreen mainScreen] scale] < 1.1) { CGRect frame = done.frame; frame.origin.x = 129; //New x coordinate frame.origin.y = 401; //New y coordinate done.frame = frame; NSLog(@"Standard Resolution"); } if ([[UIScreen mainScreen] scale] > 1.9) { NSLog(@"High Defenition Resolution"); } } [super viewDidLoad]; // Do any additional setup after loading the view from its nib. } The NSLog is triggering int he console saying 'Standard Resolution'but the button doesn't move from where I placed it in the XIB file. This may be a small stupid mistake but hopefully you can help me anyways... Thanks guys! :) P.S. Yes I did link my IBOutlet to the button

    Read the article

  • non-blocking socket client connection

    - by Igor
    ALL, I am looking for a simple example of non-blocking socket connection that will run on Windows. I tried to Google, but all samples are either for *nix (POSIX) or blocking sockets on Windows. Looking thru msdn I see that it is easy to make a socket non-blocking and issue a connect(), but then you need some preparation in order to put the socket back. So, all in all I need something on a non-blocking socket that will connect and then put it back to be blocking. The read and write operation should be performed on the blocking socket. The reason for a non-blocking socket is that I need a connection timeout and there is no other way than non-blocking socket. Or is there? Thank you.

    Read the article

  • WindowsPhone App data connection FAILS in MarketPlace published App but WORKS in Visual Studio development (same XAP)

    - by Tom
    Tearing my hair out(!) My last App update has been accepted and released by MarketPlace but the remote server data connection does NOT work/connect from the downloaded App (from MarketPlace). However, the same App (the accepted XAP) when I'm running it from Visual Studio, using the same remote server address works just fine. WHY!... Has anyone else ever run into anything like this? Here's the remote path: http://www.streamcommunication.com/ZenAwaken/DownloadableCollections.xml I can load that to a browser and retrieve the XML When I'm in Visual Studio I can connect via that path and retrieve the file and consume the data BUT!! The exact same XAP which has been accepted and distributed by Windows Phone marketplace FAILS. Is it possible that MarketPlace does something (encryption?) to the XAP that would corrupt the path string? Any thoughts or experiences would be very helpful! Tom

    Read the article

  • How do I transform a single colmn list to item matrix in R?

    - by Indy
    I currently have data that is in the following format (note, this is 1 column, 4 row matrix): aa|bb bb|cc|ee|ee cc cc|ee and I want it displayed so that the column names are: aa, bb, cc, dd, and ee. And I want there to be 4 row such that each row counts the number of times each string was present in the matching row above. ie) aa bb cc dd ee 1 1 0 0 0 0 1 1 0 2 0 0 1 0 0 0 0 1 0 1 Does anyone know how to do this in R? I would post my attempt, but it is just getting ugly and complicated. Any help would be much appreciated. Thanks in advance.

    Read the article

  • How do I do a cross domain GET of an XML feed in a WordPress plugin?

    - by MM.
    I would like to use AJAX to display dynamic content via my wordpress plugin. The data source is an xml feed from a remote domain (not owned by me). I have tried using JQuery plugins that use YQL to do cross domain Ajax calls; however, they are geared towards json and tend to return the data to me in a mangled state. My question is, is there a way of obtaining an xml feed using ajax from a remote domain?

    Read the article

  • memcmp,strcmp,strncmp in C

    - by el10780
    I wrote this small piece of code in C to test memcmp() strncmp() strcmp() functions in C. Here is the code that I wrote: #include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char** argv) { char *word1="apple",*word2="atoms"; if (strncmp(word1,word2,5)==0) printf("strncmp result.\n"); if (memcmp(word1,word2,5)==0) printf("memcmp result.\n"); if (strcmp(word1,word2)==0) printf("strcmp result.\n"); } Can somebody explain me the differences because I am confused with these three functions?My main problem is that I have a file in which I tokenize its line of it,the problem is that when I tokenize the word "atoms" in the file I have to stop the process of tokenizing.I first tried strcmp() but unfortunately when it reached to the point where the word "atoms" were placed in the file it didn't stop and it continued,but when I used either the memcmp() or the strncmp() it stopped and I was happy.But then I thought,what if there will be a case in which there is one string in which the first 5 letters are a,t,o,m,s and these are being followed by other letters.Unfortunately,my thoughts were right as I tested it using the above code by initializing word1 to "atomsaaaaa" and word2 to atoms and memcmp() and strncmp() in the if statements returned 0.On the other hand strcmp() it didn't.It seems that I must use strcmp(). I have done google searches but I got more confused as I have seen sites and other forums to define these three differently.If it is possible for someone to give me correct explanations/definitions so I can use them correctly in my source code,I would be really grateful.

    Read the article

  • SeFocus causing Run time error

    - by code8230
    I am getting: Run-time error '5': Invalid procedure call or argument this seems to happen when Text(1).SetFocus is called. However, I dont see this run time error for all the cases where I have used SetFocus. Just 2-3 places it is causing this error. Text(1).SelStart = 3 Text(1).SelLength = 1 Text(1).SetFocus I tried: Text(1).Enabled = True Text(1).Visible = True just above .SelStart, but it didn't fix the issue.

    Read the article

  • How do you invoke a web service from another web service using php?

    - by hello nottellingmyname
    So, I'm new to web programming, and for my homework I have to write some web services using PHP. Some of the web services have to use other web services, though, and we didn't learn how to do that. My professor said we should look up how to do that online. I think to call a web service using a GET parameter I just need to do file_get_contents(url), but I have no idea how to make a web service call using POST. So, how do I make a web service call from a web service using POST?

    Read the article

  • java - coding errors causing endless loop

    - by Daniel Key
    Im attempting to write a program that takes a population's birthrate and deathrate and loops the annual population until it either reaches 0 or doubles. My problem it that it continuously loops an endless amount of illegible numbers and i cant fix it. please help. //***************************************** //This program displays loop statements //Written by: Daniel Kellogg //Last Edited: 9/28/12 //**************************************** import java.util.Scanner; public class Hwk6 { public static void main (String[] args) { int currentYear, currentPopulation; double birthRate, deathRate; Scanner stdin = new Scanner(System.in); System.out.println("\nPopulation Estimator\n"); System.out.println("Enter Year"); currentYear = stdin.nextInt(); System.out.println("Enter Current Population"); currentPopulation = stdin.nextInt(); System.out.println("Enter Birthrate of Population"); birthRate = stdin.nextDouble(); System.out.println("Enter Deathrate of Population"); deathRate = stdin.nextDouble(); int counter = currentPopulation; System.out.println("Population: "); while (currentPopulation != -1) while (counter < currentPopulation * 2) { System.out.print(counter + " "); counter = counter + (int)(counter * birthRate - counter * deathRate); } System.exit(0); } }

    Read the article

  • Javascript is freezing the browser when running this code

    - by user1420493
    I am trying to get the value of a text input and check if there is any links in it and then take those links and make them into tags. But when I run this code, something is going wrong and it completely freezes the page. Basically, I want it to check for "http://" and if that exists, to keep on adding to the substr length until the end of the string/link. Is there a better way to do this? // the id "post" could possibly say: "Hey, check this out! http://facebook.com" // I'd like it to just get that link and that's all I need help with, just to get the // value of that entire string/link. var x = document.getElementById("post"); var m = x.value.indexOf("http://"); var a = 0; var q = m; if (m != -1) { while (x.value.substr(q, 1) != " ") { var h = x.value.substr(m, a); q++; } }

    Read the article

  • VS 2010 SQL Update for SQL Statement

    - by Mike Tucker
    Please bear with me as I'm just beginning to learn this stuff. I have a VS 2010 Web project up and I'm trying to understand how I can make a custom UpdateCommand (Because I chose to write my own SQL statement, I do not have the option for VS 2010 to auto generate an update command for me.) Problem is: I don't know what the UpdateCommand should look like. Here is my Select: SELECT * FROM Dbo.MainAsset, dbo.Model, dbo.Hardware WHERE MainAsset.device = Hardware.DeviceID AND MainAsset.model = Model.DeviceID Which, VS 2010 turns into: SELECT MainAsset.pk, MainAsset.img, MainAsset.device, MainAsset.model, MainAsset.os, MainAsset.asset, MainAsset.serial, MainAsset.inyear, MainAsset.expyear, MainAsset.site, MainAsset.room, MainAsset.teacher, MainAsset.FirstName, MainAsset.LastName, MainAsset.Notes, MainAsset.Dept, MainAsset.AccountingCode, Model.Model AS Hardware, Model.pk AS Model, Model.DeviceID, Hardware.Computer, Hardware.pk AS Expr3, Hardware.DeviceID AS Expr4 FROM MainAsset INNER JOIN Hardware ON MainAsset.device = Hardware.DeviceID INNER JOIN Model ON MainAsset.model = Model.DeviceID How would I approach updating one column, say "MainAsset.site" if that's changed in the Gridview DDL? Any help constructive help would be appreciated. Thank you.

    Read the article

  • How to determine element touched on touchend for a page with layers

    - by Greg
    I cannot supply a follow up question as of yet to Get the element under a touchend , so I am opening a new issue. I want to get the element under a touchend that is different from the touchstart, but my page has absolutely positioned elements, and the function document.elementFromPoint keeps on returning my background element instead of every element in front of it. How do I get the actual element being touched?

    Read the article

  • How to remove certain lists from a list of lists using python?

    - by seaworthy
    I can not figure out why my code does not filter out lists from a predefined list. I am trying to remove specific list using the following code. data = [[1,1,1],[1,1,2],[1,2,1],[1,2,2],[2,1,1],[2,1,2],[2,2,1],[2,2,2]] data = [x for x in data if x[0] != 1 and x[1] != 1] print data My result: data = [[2, 2, 1], [2, 2, 2]] Expected result: data = [[1,2,1],[1,2,2],[2,1,1],[2,1,2],[2,2,1],[2,2,2]]

    Read the article

  • How can I check the type of an object against a list of types?

    - by RookieRick
    Given a collection IEnumerable<Type> supportedTypes What's the best way to check whether a given object is one of those types (or a derived type)? My first instinct was to do something like: // object target is a parameter passed to the method in which I'm doing this. if (supportedTypes.Count( supportedType => target is supportedType ) > 0) { // Yay my object is of a supported type!!! } ..but that doesn't seem to be working. Can I not use the "is" keyword in a lambda expression like this?

    Read the article

  • Store an array of UIViews in NSUserDefaults

    - by Mona
    I'm trying to add an array of uiviews to NSDefault but it doesn't seem to be keep the array. Does any one know why? I also tried to store each view in nsvalue before storing it in nsdefault which still didn't work. NSArray *arr = [[NSArray alloc] initWithObjects:[NSValue valueWithNonretainedObject:myView], nil]]; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setObject:arr forKey:@"myKey"]; NSArray *resultArray = [defaults objectForKey:@"myKey"]; and resultArray is nil! Thanks the reason why I'm trying to do this is because these are the header views of my uitableview. Since it takes time to create them I wanted to create them only once and store them for future access.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16  | Next Page >