Popular Posts

AFNetworking 2.0 POST request working example code snippet

| July 22, 2014 | 0 Comments

I was trying to send json in POST request using AFNetworking but it started behaving strange. It gave me 400 bad request error. After struggling alot I am able to run it. Please find working example below.

 

+ (void)login:(BOUser *)user responseBlock:(APIRequestResponseBlock)responseBlock {

AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
manager.responseSerializer = [AFJSONResponseSerializer serializer];
manager.requestSerializer = [AFJSONRequestSerializer serializer];

[manager.requestSerializer setValue:@"parse-application-id-removed" forHTTPHeaderField:@"X-Parse-Application-Id"];
[manager.requestSerializer setValue:@"parse-rest-api-key-removed" forHTTPHeaderField:@"X-Parse-REST-API-Key"];
[manager.requestSerializer setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
manager.securityPolicy.allowInvalidCertificates = YES;

NSString *URLString = [NSString stringWithFormat:@"%@login", BASE_URL_STRING];
NSDictionary *params = @{@"email": user.username,
@"password": user.password};


[manager POST:URLString parameters:params success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSLog(@"JSON: %@", responseObject);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"Error: %@", error);
responseBlock(nil, FALSE, error);
}];

}

I hope it will save someone’s time.

Author: asif.noor@techipost.com

Open Source Multi Values Selector Dropdown in iOS

| April 26, 2013 | 0 Comments

Most of the time, we need multiple values selector in iOS for example selecting multiple days of the week, selecting multiple contacts, selecting multiple countries from dropdown. If there is one country selected in dropdown, then it will show selected country. If there are multiple countries selected then it will show “Multiple Countries

Continue Reading

Responsive Business Portfolio: Folio

| November 7, 2012 | 0 Comments

Folio is a responsive html  business portfolio template.The template is exclusively  designed/developed  for techipost.com by Sarfraz Shaukat. Its intuitive text/image slider gives you a good showcase to project your Business Portfolio, Projects,Products etc. Its simple and clean design makes it more attractive and eye catching for users.

Continue Reading

How to become an iOS developer

| October 17, 2012 | 4 Comments

Developer: asif.noor@techipost.com

Motivation behind learning iOS development or becoming iOS developer

Well ! to be honest, I started iOS application development in mid of 2010 because everyone was talking about iOS and being an iOS developer you can earn more than developing for other platforms. Mobile development is dominating the market.Moving from developing applications for PC to mobile was exciting transition. Flows of application on iOS was different. Because of less memory available on phone, developers also need to do memory managements which was new to me at start when shifting from .Net development to iOS development. Tuning applications for performance is always a key goal in iOS. Do you also plan to start iOS development? then why not !

Continue Reading

One pager WordPress theme

| October 11, 2012 | 22 Comments

I recently developed this one pager business portfolio wordpress theme for Egrappler . Here is the Standardized version of this theme without using any external Option Tree framework. This version is perfect for those user who are getting issues with the  Option Tree version.

Continue Reading

Brownie-Free WordPress Theme

| October 8, 2012 | 0 Comments

Brownie is a  clean , beautiful and responsive Premium WordPress theme developed by Umair Ashraf . The template of this theme is designed by  Sarfraz Shaukat  Brownie template .  You can visit his site Egrappler.com for his other valuable and excellent designs and resource.

Continue Reading

Free Responsive Portfolio WordPress Theme :Creative

| October 1, 2012 | 0 Comments

 

IAmCreative is another simple, clean and responsive HTML5 portfolio WordPress theme developed by Umair Ashraf. It helps you to effectively project your work and it is perfect for any designer, photographer, illustrator, creative person or agency. It focuses on displaying a high quality portfolio, large typo presented in a really elegant way.

Continue Reading

MVC (Compound design pattern) in Objective-C

| September 24, 2012 | 6 Comments

Continue Reading

Useful WordPress Code Snippets

| September 20, 2012 | 0 Comments

Today i am starting a new series of posts related to code snippets on my blog and i would like to share some interesting and very useful WordPress code snippets in today’s post. You will certainly find these code snippets useful during WordPress theme development.

Continue Reading

How to Integrate OptionTree for WordPress Theme

| September 10, 2012 | 3 Comments

OptionTree is one of the best available option panel for WordPress and is also used in most of Premium WordPress themes.With its wonderful user interface and special features including Drag Drop and Order Items makes it a versatile  theme options UI builder.You can install it as a plugin but this tutorial will help you to integrate it in your  WordPress Theme without having to download and activate it via plugin page.The tutorial also covers how to make option pages through code instead of using UI builder page provided by the plugin.

Continue Reading