ios - How can we pass multiple urls in collectionview -


I am creating a social networking application, using the horizontal collection view cell displayed for the post.

My needs are,

  1. I have 10 differnt url api but initWithFormat: @ "acc_id = 104 & method = getHomeContents & amp; start_limit = 0 ") If I increase start_limit then I can get another post description.

  2. I have to pass this data at viewdidload

  3. but how to get this post data in viewdidload and collectionView numberOfItemsInSection time How can I suggest any ideas for this

      if (indexPath.item == 3) {NSString * post = [[NSString alloc] initWithFormat: @ "acc_id = 104 and Amp; method = getHomeContents and start_limit = 0 "]; // NSLog (@ "% @", post); NSDTA * PostData = [Post DataUputing Encoding: NSITF 8 String Encoding Permission Loansy Conversion: No]; NSString * postLength = [NSString stringWithFormat: @ "% lu", (unsigned long) [postdata length]]; NSMutableURLRequest * Request = [[NSMutableURLRequest alloc] init]; [Request URL: [NSURL URLWithString: [NSString stringWithFormat: @ "http: vblive / apifiles / services.php?"]]]]]; [Set http system: @ "post"]; // NSLog (@ "Request is% @", request); [Set set property: post length for http header field: @ "content-length"]; [Request Set Value: http "Headerfield for" app / x-www-form-urxode ": @" current-type "]; [Set http: bb: postdata]; _myConnection2 = [[[NSURLConnection alloc] initWithRequest: Request Rep: Self]; // NSLog (@ "% @", Con?); If (_myConnection2) {NSLog (@ "Coincidence Success"); } And {nslog (@ "unissue"); }     

    }

    thanks

    upper

    Try something like this 1 Create a tag or you can use a variable like

    NSString * startLimitValue;

    2. Then initialize the light value was loaded or where ever you want

    startLimitValue = @ "one"

    3 Then specify the starting border

    You can also use tags for specific items

    then use the counting method to create items Do not set the number of dynamically

    - (NSInteger) collectionView: (UICollectionView *) CollectionsView numberOffitem Inception: (NSInteger) section

    {

    If (your condtion probe)

    {back to your object count]

    }

    Other

    If (your conditon )

    {

    Back [your object count];

    }

    }

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -