Tag: objective c

Search Bar click detect

I have a search bar and i want to detect when the user click it , and after to disable a button while the user is editing in search bar. How can i do this , because i was trying to do wha you will see above but it’s never called. -(void)searchBarSearchButtonClicked:(UISearchBar *)searchBar{ NSLog(@”yes”); } […]

Objective-c , AVPlayer taking too much time to Resume play audio from URL

I have implemented AVPlayer. It is working fine. But many times during playing audio from URL, it stops/pauses automatically and takes very long time to resume/replay. On the other hand if I manually just pause and play it works fine means it does not take too much time to re-play. I want to resume/replay it […]

Core Data Group By Monthly and Sum

Is there any way to GROUP BY core data based on its month then SUM its properties? I have data like this ———————— date | amount ———————— 30-08-2017 | 124000000 28-10-2017 | 124000000 16-10-2017 | 124000000 14-12-2017 | 124000000 20-12-2017 | 124000000 ———————— I just need to show one latest year, so I created my […]

Apple Mach-O Linker Error? clang: error: linker command failed with exit code 1 (use -v to see invocation)?

I am working on google analytics (iOs, Objective c), when i add this file “libGoogleAnalyticsServices.a” to my project I got this error “Apple Mach-O Linker Error” “clang: error: linker command failed with exit code 1 (use -v to see invocation)”. I added below files successfully. GAI.h GAIDictionaryBuilder.h GAIEcommerceProduct.h GAIEcommerceProductAction.h GAIEcommercePromotion.h GAIFields.h GAILogger.h GAITrackedViewController.h GAITracker.h CoreData.framework […]

How to simply test a local Wifi Connection to an IP, for example 192.168.0.100 with code status?

Do you know if I can simply test if there is a WIFI local connection ? For example if the url 192.168.0.100 is reachable. I tried with the Reachability without success. It tells me that it is connected, but it is not true. I would like first to test if there is a local WIFI […]

Setting cells height gives me error

I have a UIView in a UITableViewCell. I’m trying to change the height of the view with an animation. Here is what I did: self.myViewConstraint.constant = 100; // Coming from 0 [UIView animateWithDuration:0.3f animations:^{ [self.view layoutIfNeeded]; }]; The only thing is, it’s in a tableView. So here’s what I did for the heightForRow…: return self.myViewConstraint.constant […]

MPMusicPlayerController systemMusicPlayer play skipToNextItem is slow with lag

I am using a MPMusicPlayerController systemMusicPlayer to play music, but after skipping songs I notice significant lag. Here is my “lag” that I have measured, at times it is faster: 1.280796 1.210124 1.019931 1.167739 After skipping several songs the delay before you hear sound increases quite a bit. -(void)viewDidLoad { [[MPMusicPlayerController systemMusicPlayer] setQueueWithQuery:[MPMediaQuery songsQuery]]; [[MPMusicPlayerController […]

I have two views on one cell, when I click on a cell it will be hidden and one edit form will be expanded on that. How to resolve that?

I’m a beginner iOS. I have one cell of tableview with two custom views: one is item cell and one is edit form that cell. When user click on item, that item will be hidden and the edit form of that cell will be expanded on that. How I can resolve that problem. Thank you! […]

GPUImage shader crashing with “ERROR: One or more attached shaders not successfully compiled”

I’m trying to build a Vibrance filter for GPUImage based on this Javascript: /** * @filter Vibrance * @description Modifies the saturation of desaturated colors, leaving saturated colors unmodified. * @param amount -1 to 1 (-1 is minimum vibrance, 0 is no change, and 1 is maximum vibrance) */ function vibrance(amount) { gl.vibrance = gl.vibrance […]

Restrict the Google AutoComplete API to show only nearby locations

For location finding Google AutoComplete works good but its returning the search results all over the world. I want to restrict the search results either with in the 1000 meter radius or in a city. I followed this google link to integrate the autocomplete search. Only this below code used in project -(void)autoComplete { GMSAutocompleteViewController […]