Count the number of selected rows in uitableview

What I actually want to do is to count the number of rows selected after selecting and deselecting the row. I get the total count but when I deselect the row I want to get count as how many other rows are still selected. My code is as follows //count

How do I know where the error is raised in Xcode Objective-C?

I'm beginner in Objective-C, I'm struggling with this code that running in iOS 7.1 but crash in iOS 8. How I can know where is problem from stack trace? And why a code works in older version (iOS 7) and not work in newer version? Is that a problem wi

Update UITableView when UIScrollView content changes

I have 2 ViewControllers, each of which includes a scrollview (that shows several graphs) and a tableview. I'd like to update the tableview content based on the current graph displayed in the scrollview. The scrollview is managed by a separate class

iOS Streaming mp3

I've been searching for a good tutorial for playing and streaming audio finally I found this which seems to offer an offline audio playing. in the YMCAudioPlayer class I've commented loading a resource and provided NSURL* generated by a direct link i

Using NSPredicate for PFQuery Effective

My app is using Parse as a back end. At some point in the app, i have to query objects that should contain at least one of the tags in another array. To make it clear, in the database i have a class Pictures which has a Tags property that saves tags

Delete custom lines from UITableView

I'm just practicing with UITableView. Here is what I did so far. made cells with xib.file from scratch. Data is stored in P-list. Using [ MutableCopy] and convert array into mutableArray It looks little strange but I made the delegate connection usin

Reading basic data as objects

I have 1 entity in my database "Message" with the values MessageID, messageText and i want to read every row of Core Data, make an object of my class "Message" and put the new object into an array. It's the first time I'm using Core Da

iOS 7 SDK does not respect the audio background

I have done a lot of research, both on Google and StackOverflow. All the answers I found do not work in iOS 7. I started writing fresh app in iOS 7 SDK with Xcode 5. All I'm trying to do is play audio in the app from a file stored in the app bundle (

TFHpple - Get the HTML element without element tags?

I'm parsing some HTML and I need to get all the innerHTML of <body />. I'm doing it this way: TFHpple *doc = [[TFHpple alloc] initWithHTMLData:[NSData dataWithContentsOfFile:sectionFilePath]]; TFHppleElement *body = [doc searchWithXPathQuery:@"

How to refresh UIViewController programmatically?

I have a ViewController in which the user selects a card (a custom UIButton) out of a UIScrollView. I have intercepted the touch event selecting the card and identified it, and then removed it from the data source, but it still exists in the UISubVie

How do you change the wrap property for the iCarousel library?

I'm really confused. Do I have to go in the iCarousel.h file and change it there, or can I access the property in code and then reloadData?There is a delegate method you can call: - (BOOL)carouselShouldWrap:(iCarousel *)carousel { //wrap all carousel

Using POST in Goal c

I'm having trouble in actually using POST to save/change information on my database. Could someone please help me? NSDictionary *newDatasetInfo = [NSDictionary dictionaryWithObjectsAndKeys:un, @"username", n, @"name", pn, @"phonen

Where and how __bridge

I need some advice on __bridge-ing in iOS. Hopefully the SSCCE1 below will explain the problem better than I can in words, but I need to know how I can convert a void* to an NSMutableArray*; which __bridge variation should be used (See comment in cod

How to post a message with url on Facebook?

I am posting a post on facebook. I am able to post a URL but I also want to post some description with that URL. I am using it - NSString *shareUrlString = [NSString stringWithFormat:@"http://www.facebook.com/sharer.php?u=%@&t=%@", urlString

Convert decimal to fraction (rational number) in Objective C?

As part of a calculator app, I am trying to implement uses with sigma notation. However, the result it prints out is always a decimal, and the rest isn't important. I simply want to change the decimal to a fraction. I already have the reduce function

UIImage in UITableViewCell

I'm trying to put image in UITableViewCell. I use SSMessages style for my messages. Tried something like cell.imageView.image = [UIImage imageNamed:message.messageText]; but it isn't work. Any suggestions? Maybe need my other code?Use SSMessageTableV

NSData or NSAttributedString with SBJSON

I am using the SBJSON to convert my NSDictionary to a JSON String in my iOS application. when my dictionary contains a NSAttributedString or an NSData, the SBJSON fails to generate the string representaiton. Incase of NSAttributedString, the error is

Save sampleBuffer in the table (AVFoundation)

I try to save the sample buffer instead of an UIImage to an array, to convert it later on. This to speed up the image capturing and maybe not get memory warnings. I just can't figure out how to save it to the array and then use it again to call [self

Adding master data to the existing project in XCode 4

I started off the project without Core Data and now I would like to add that functionality to my apps. How do I do this? What additional things does XCode sets up when you actually tick the Use Core Data when you create a new project?One trick is to

Goal Conversion C to C # - What is the equivalent of this code?

I am converting some Objective C code to C# for use in a Monotouch iPhone app. In Objective C, the following equivalence condition is tested: if ([cell.backgroundView class] != [UIView class]) ... do something cell is a UITableViewCell. In C#, I'd li

self.window.rootViewController vs window addSubview

I've noticed a lot of examples for iPhone apps in the Application Delegate - (void)applicationDidFinishLaunching:(UIApplication *)application have [window addSubview: someController.view]; (1) as opposed to self.window.rootViewController = self.someC

does anyone know how to catch NSInvalidArgumentException?

is there any way to catch it? Or is this a bug? thanks.It is a bug. Specifically, a bug in your code. NSInvalidArgumentException means you've passed bad data into a method. Frequently this means you've passed nil as an argument that doesn't allow nil

Mapping the IOKit IOReturn error code on String

When I get error 0x10, I want to be able to make sense of that error code. Looking up IOReturn.h and mach/error.h is not particularly convenient. I was lost when I got 0x22 error code. This is really silly question but is there a function like error2

to create a reusable library in XCode 3.2

How do I create a reusable library/module in XCode 3.2? What I want to do is create a bunch of classes that provide certain functionality compile them into some kind of library, add such a library to an existing xcode project and use the classes in i