Tag: objective c

What happens with unarchived objects?

After I’ve unarchived an object with NSKeyedUnarchiver, I am able to use it like usual, but I am unable to re-archive it. When I try, it crashes. [NSKeyedArchiver archiveRootObject:unarchivedObject toFile:fileName]; I tried looking in the developer resources in apple but I haven’t seen a thorough explination of proper usage of NSKeyedArchiver. Please Help. Exception Type: […]

Is it possible to make an Objective-C project (no UI, no simulator) to be tested on Travis (travis-ci.org)?

I wonder if it is possible to make an Objective-C project (no UI, no simulator is needed, hosted on Github) to be built on Travis? Current Travis docs seems not to contain any information regarding the option to have Objective-C projects built on Travis. But Building a C Project says that: Travis VMs are 32 […]

passing a bytearray as a parameter of a method (CoreMIDI implementation)

I’m trying to create a method that outputs MIDI information to a virtual client using CoreMIDI. The “action” method is MIDIReceived, which sends midi data in the form of MIDI packets to a virtual client. Below, I’ve created a method that accepts a MIDI byte as a parameter, which the method should add to a […]

Twilio crash while building the app in device in IOS

I have added Twilio SDK and libJingleConnection through cocoa pods. Twilio libraries like libssl.a , libcryto.a is getting conflicts with Libjingle_Connection libraries like libwebrtc.a so twilio is crashing.. Without integrating libjingle_connection. Twilio integration is working fine.! It is similar to below problem When using Twilio iOS sdk and building Cordova app openssl crashes But I […]

Keyboard hiding UIView iOS

I know this question has been asked a few times. I understand how to move the view up or a textfield up when the keyboard is presented, however I am running into a glitch that I cannot seem to figure out. The view I am trying to move up is inside a UIViewController that acts […]

Detect if a UIView is behind another UIView in parent

I have a parent UIView with several subviews. The subviews are siblings – the child-views are not sub views of each other. (Each at the same heirarchical level in their superview) For instance: UIView *containerView = [[UIView alloc] initWithFrame:frame]; CustomUIView *childView = [[UIView alloc] initWithFrame:anotherFrame]; CustomUIView *yetAnotherChildView = [[UIView alloc] initWithFrame:anotherFrame]; [containerView addSubview:childView]; [containerView addSubview:yetAnotherChildView]; […]

Searchbar is not working iPhone Xcode 4.2

I am using this code for search bar, but it is not showing any results. in viewdidload method: filteredListitems = [[NSMutableArray alloc] initWithArray:listVehicles]; searchbar methods: -(void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText { if ([searchText length] == 0) { [filteredListitems removeAllObjects]; [filteredListitems addObjectsFromArray:listVehicles]; }else { [filteredListitems removeAllObjects]; for (NSString * string in listVehicles) { NSRange r = [string […]

Curl an image left to right

I have an imageview which is a diary showing two pages. I want an effect such that only half portion of the image that is one page of a diary just curls from left to right and vice-versa. So that it brings an effect such that the user is turning the page of a diary. […]

Build dependencies and static libraries in Xcode 3

I’m trying to get the example project for an SoundCloud API wrapper working using XCode 3. There are some few basic instructions at the start, but I’m having trouble: QuickStart In your terminal: git clone git://github.com/soundcloud/cocoa-api-wrapper.git SoundCloudAPI cd SoundCloudAPI git submodule update –recursive –init In your Xcode project: drag SoundCloudAPI.xcodeproj into your project add it […]

NSDate for the same local time as another NSDate in different time zones

I have a date time: Friday, July 8, 2016 at 6:30:00 PM India Standard Time I want a date time like this: Friday, July 8, 2016 at 6:30:00 PM Central Daylight Time I do not want to convert the dates using NSDateFormatter from one timezone to another, because this conversion will give me Friday, July […]