开发者

Print NSString Argument using NSLog

开发者 https://www.devze.com 2023-03-17 22:17 出处:网络
-(void) postToDB:(NSString*) msg{ //print msg NSString *myphp = @\"/Applications/MAMP/htdocs/databases/test.php\";
-(void) postToDB:(NSString*) msg{
    //print msg
    NSString *myphp = @"/Applications/MAMP/htdocs/databases/test.php";
    NSURL *url = [NSURL URLWithString:myphp];
    ASI开发者_StackOverflow社区FormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
    [request setPostValue:msg forKey:@"message"];
}

In the above method, how can I print 'msg' using NSLog?

Many thanks


NSLog(@"%@",msg); its of type NSString.


Using This

NSLog(@"Message == %@",msg);


You will like this:

#define CNMLog(msg) NSLog(@"%@", msg)
CNMLog(msg);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号