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

Adding dynamic sub-rows by selecting tableview row in tableview iPhone errors?

I want to add row dynamically. I have tableview list of building names. If some one choose building(didSelectRowAtIndexPath) then respective floors of building should get added dynamically as subrow. Its like maximizing and minimizing the subrow on respective building list selection. How do I do this. Thanks in advance… – (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { // There […]

Removing view from its superview

I have added a few buttons to self.view. When the user clicks on one button, i will load another view (subView). My code where i am loading the subView is shown below subView = [[UIView alloc] initWithFrame:CGRectMake(0,0,self.scrollView.contentSize.width, self.scrollView.contentSize.height)]; subView.tag=1; // and then i add various other components to it [self.view addSubview:subView]; // and finally add […]

Failed to install iphone application for ad hoc

I followed the stepped to create a ad hoc carefully: Added the testers team devices to the devices list in iOs Provisioning profile page Created a new distribution profile for ad-hoc In xcode I chose the project and clicked on product->archive. I sent both the archive (ipa file) and mobile provision to the testers team. […]

With Objective-C, what is the best way to log in to a service and scrape content from the resulting page without an API?

One service I’m using doesn’t have an API, but allows scraping, so I’m curious what the best way in iOS/Objective-C would be to do the following: Get user login credentials Submit them on the websites login page Grab specific links from the resulting page How does one circumvent issues such as the fact that the […]

I need to implement the expandable tableView cell in ios 8

In my project I need to implement the UITableview with some of the tableView cells are expandable and some of them are independent. If it is expandable cell need to indicate the ‘+’ symbol.enter image description here. Can any one please help me out

Non-string key in NSDictionary object?

I’ve parsed some JSON data using NSJSONSerialization from the Foundation framework – however, I’m getting a weird key for an NSDictionary group as follows “stop_times” = ( { “departure_time” = “5:48a”; “departure_timestamp” = 1355309284; “service_id” = 1; shape = “Scarborough RT To Kennedy Station”; } Any idea what the key “shape” might be? Is it […]

UICollectionviewcell change background

How to change the background in the cell if I know the section number and the item number? The code below shows how I tried to do it. – (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { CalendarCollectionViewCell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:@”cellIdentifier” forIndexPath:indexPath]; cell.titleLabel.text = [NSString stringWithFormat:@”%i”,indexPath.item-dayStart+2]; if (indexPath.section == todayMonthSection && indexPath.item == dayPlusShift){ cell.backgroundColor = [UIColor colorWithRed:60.0/255.0 […]

How do I create a multidimensional array?

I need to keep 90×90 array data for iphone app. how can i keep this data? making an multi-dimensional array is a solution for this big table. or is there an other solution.

What does a type name in parentheses before a variable mean?

I am having a bit of trouble understanding this piece of code. It is from a book I am reading but I feel like the guy is just telling me to type stuff without explaining it in much depth. – (IBAction)sliderChanged:(id)sender { UISlider *slider = (UISlider *)sender; //set slidervar as active slider int progressAsInt = […]

How to Play Audio in background in IPhone?

I’m trying to play audio file at particular time which i have set.for that I have added audio in “UIBackgroundModes” in info.plist and backgroundtaskidentifier in didEnterBackground.Its working in simulator but not in device.Can anyone help to solve this. Thanks in Advance…