Questions tagged as 'objective-c'

1
answer

I can not record a file from a URL with NSData and writeToFile

I have a very simple code to record a file downloaded from a URL in the SandBox. The file I save it in an object NSData but at the time of writing it with writeToFile it does not do it. On the other hand I have another code that is...
asked by 10.05.2017 / 16:37
1
answer

Scale an image and then rotate it?

I have a png image on an object. The image is a circle filled with a color. I want to scale the object higher than wide so that the circle looks like an oval. When trying to scale the object it works fine but then if I want to rotate the oval an...
asked by 07.02.2017 / 00:25
1
answer

Drag a view with the speed of the UIPanGestureRecognizer gesture

I have a method that drags me a view as I slide my finger on the screen. For this I use UIPanGestureRecognizer . In the method I increase the position x of the view point to point, but I'm interested in moving it according to the sp...
asked by 11.01.2017 / 17:33
1
answer

UILocalNotification is obsolete in IOS10

I am working on an app that generates notifications, however when generating a notification on a device with a version equal to or greater than 10; the notification is not generated. How can I change the following method to work on all devices?...
asked by 24.01.2017 / 21:29
2
answers

Convert Array String to Array float

People have a challenge I have to convert arrayString to arrayFloat it's not how you usually do it array *date = [obj valueForKey:@"oficialTime"];// por ejemplo 10:10:02 float f = [date floatValue]; The problem here is that array is in Ns...
asked by 20.01.2017 / 13:12
1
answer

Move a Slider by steps or segments

I need to create a Slider that moves in steps. On a scale of 0 to 100 units, you can move in 5 steps of 20 units. I tried to do it with the Slider class that comes by default in Xcode. I had thought to round the value when I moved the Slider to...
asked by 15.12.2016 / 10:13
1
answer

Objective-C How to save the pointer to a static method in a variable?

I would like to save in a variable the address of a static method and then call it when it interests as if it were a function pointer in C. How would it be implemented in Objective C? Would it work the same for non-static methods?     
asked by 21.11.2016 / 22:17
1
answer

Back to erase subviews of a TableView after a reload?

I have a TableView to which in each cell I add several imageView. In a moment of the application I have to change the imgeView of a cell in one position for another imageView therefore I do a reload of the tableView. The problem is that when doi...
asked by 17.03.2017 / 16:42
1
answer

Load CPU IOS Swift

I need to know the CPU% load of the iPhone but I can not find anything in Swift or Objective-C. I have found something that uses% of the total CPU application. Someone could help me with information or something. Thanks     
asked by 19.01.2016 / 08:25
1
answer

UIView animateWithDuration in Swift 4

I have this code in Objective-C and I want to pass it to Swift 4. Can someone tell me the simplest way? I'm starting with the language and I'm a little lost, thanks. [UIView animateWithDuration:0.25 animations:^{...
asked by 12.04.2018 / 08:14