iOS Development is easy with XCode, Swift3, UITableView, cocatouch, let's build iPhone, iPad and Macbook Applications.

Scroll Multiple UICollectionView with one collectionview IOS

I am working on an application in which, I have UITableView and in each cell of uitableview i have uicollectionview scrolling horizontally. Now, What I want is that: When I scroll one collectionview in any direction then all other collectionviews of my table should scroll accordingly in that direction. I have tried using scrollview delegates […]

RNCryptor AES256 to match PHP MCRYPT_RIJNDAEL_256

The PHP API I’m calling from within my iOS app requires the payload to be encrypted in a certain customised way. I’m having troubles replicating that approach in Objective-C, with RNCryptor. Here is the PHP code used to encrypt a string: function encrypt($string) { $key = ‘some-random-key’; return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $string, MCRYPT_MODE_CBC, md5(md5($key)))); } And […]

Post Data through json webservices in iphone

I want to post data through json webservicesmy on button click Action code is: -(IBAction)login:(id)sender { NSString *newurlString = [NSString StringWithFormat:@”{\”name\”:\”asit\”,\”email\”:\”m.kulkarni@easternenterprise.com\”,\”businessType\”:\”1\”,\”score\”:30}”]; NSString * url = @”http://www.nieuwe-dag.nl/mobile_be/public/?action=saveScore”; NSData *postData = [newurlString dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES]; NSString *postLength = [NSString stringWithFormat:@”%d”, [postData length]]; NSLog(@”urlString::%@”,newurlString); NSLog(@”postLength::%@”,postLength); NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLCacheStorageNotAllowed timeoutInterval:300]; [request setHTTPMethod:@”POST”]; [request setValue:postLength forHTTPHeaderField:@”Content-Length”]; [request […]

Multi-parameter mapping with Three20 and TTURLMap

I’m following this tutorial and declare the following mappings in my app delegate: [map from:@”x://profile/(initWithId:)/(name:)” toViewController:[ProfileViewController class]]; [map from:@”*” toViewController:[TTWebController class]]; In ProfileViewController.m I implement the – (id)initWithId:(int)anIdentifier name:(NSString *)name selector to handle such mapping. I suppose opening URLs like x://profile/1/John Doe would invoke [[ProfileViewController alloc] initWithId:1 name:@”John Doe”], however, this seems not to be […]

How to convert formatted content of NSTextView to string

I need transfer content of NSTextView from Mac app to iOS app. I’m using XML as transfered file format. So I need to save content of NSTextView (text, fonts, colors atd.) as a string. Is there any way how to do that?

Objective C equivalent of PHP range function?

I want to quickly create an array of numbers from 0 to 10000 but with stepping increments of 500, for an array that looks like this: @[@0, @500, @1000, … @10000] in PHP, this is built in to the range function, you could generate it like this: range(0, 10000, 500) I’m not really looking for […]

custom buttons on uiwebview(iphone)

I want to add custom button on webView. they should also should be there when i try anything in url. how is it possible?? basically i want to put buttons on uiwebView and they are custom buttons //edited code… I am doing this…here link is appearing but method is not getting called…and there wasnot any […]

Set different font size for iPhone 5 and 6

I have searched for but not found an answer to this yet. I would like to set different font sizes of labels for iPhone 5 and 6. I know that I can set specific layout for Compact Width, but both 5 and 6 belong to that group. Is there a way to do this?

The user credentials are need to obtain access token. Please call the non-silent acquireTokenWithResource methods

I am using ADALiOS into my app for authentication. When user signIn into the app I am getting following error: “The argument ‘cacheItem.scopes’ is invalid. Value:(null).” and “The user credentials are need to obtain access token. Please call the non-silent acquireTokenWithResource methods” Any help would be appreciated. Thanks

UIButton inside UITableViewController

I have a UIButton that is created inside of each table cell. I want to hook up a touch event like so: [imageButton addTarget:self action:@selector(startVote:) forControlEvents:UIControlEventTouchUpInside]; I want to pass data about the current row (the id of the object for that row) to the startVote method. Is there a method that I am missing […]