Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
March 24, 2018, 06:40:08 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register Chat  
Pages: [1]   Go Down
Author Topic: Define Kbase Url  (Read 2068 times)
Posts: 1

« on: August 24, 2016, 12:22:11 AM »

Hye,I having some problem here please help me as im new to xcode and objective C

#define kBaseURL      @""
I defined ^ on my prefix.pch file

And to make maintenance easier in the future,so By defining kBaseURL = "" I wouldnt have to manually edit every single line on my code and just by editing on my prefix page.

1)NSDictionary *dictchat;
        if ([[responseDict objectForKey:@"user_id"] isEqual:[NSNull null]]) {
            dictchat = @{@"UtoB":@"YES", @"user_id":@"1", @"first_name":@"Support", @"last_name":@"Oncalled", @"avatar_url":@"", @"business_id":[responseDict objectForKey:@"id"], @"business_title":[responseDict objectForKey:@"profile_title"]};

NSString *Name=[NSString stringWithFormat:@"%@",[[self.filteredArray objectAtIndex:[sender tag]] valueForKey:@"company_name"]];
        NSString *Title=[NSString stringWithFormat:@"",[[self.filteredArray objectAtIndex:[sender tag]] valueForKey:@"id"]];

NSString *tempString;
            if ([self.filteredArray[indexPath.row]valueForKey:@"post_url"]!=nil|| [[self.filteredArray[indexPath.row]valueForKey:@"post_url"] isKindOfClass:[NSNull class]])
                tempString = [[self.filteredArray[indexPath.row]valueForKey:@"post_url"] stringByReplacingOccurrencesOfString:@"" withString:@""];

How to replace instead of using the link,I replace kBaseURL within the avatar url above,really appreciate helps it so much

Pages: [1]   Go Up
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents ゥ 2009 All rights reserved.