Posts by Tiago Amaral • 1,520 points
139 posts
-
0
votes2
answers150
viewsQ: Is it possible for a Closure (Swift) to capture reference of the instance of the object that executes it?
I am passing a closure for the property of an object, and within the closure would need to make a reference to the instance of the object that will run the closure. Example: typealias validator :…
-
0
votes2
answers78
viewsA: Unwind Segue - Objective-c
Good friend, from what I understand, the user after logging in would have to the main screen of the App. Your question needs more technical information for more precise guidance. Does your app use…
-
2
votes1
answer70
viewsQ: How to convert XML to Swift objects?
How can I convert XML request replies to objects in Swift format, just like Objectmapper does with JSON for objects?
-
1
votes2
answers96
viewsQ: How to debug errors in Realm DB?
How can I debug this error and know its origin: lib c++Abi.dylib: terminating with uncaught Exception of type Realm ::Incorrect threadexception: Realm accessed from incorrect thread.…
-
0
votes1
answer109
viewsQ: Problem trying to update object instance with Realm
I made a request in the local database and received an array with the data. Then I run the array with looping for, looking for an object with a specific id, when locating the object I try to update…
-
0
votes1
answer47
viewsQ: Put a line on a Uitabbaritem?
How to place a line at the bottom of a Uitabbarbutton as it occurs in this image: However this line should only appear on the selected button.…
-
1
votes1
answer374
viewsA: How to group Markers in Google Maps iOS API?
Guys, although it’s been a while, I’m going to leave here the solution I found to help other people who face the same problem. I used API to solve the problem:…
-
0
votes0
answers30
viewsQ: How to insert default values into the table along with a variable value?
Setting: I have a database with 2 tables, table A has the screens of an app, and screen B records the activity on each screen, getting this way: ____________________ | Tabela A | -------------------…
-
0
votes2
answers80
viewsQ: <ion-spinner> only works once, how to correct it?
Setting: The directive <ion-spinner> is used on screen A, but when it is used on the next screen, screen B, a problem occurs, in which it appears, but does not have the animation. Someone has…
-
4
votes1
answer50
viewsQ: How to configure predicate to return only 2 columns?
Setting: Query using Coredata for records with a city and state, and return only the columns 'name' and 'address' of the location. I am currently using the following query: // Array that will be…
-
0
votes1
answer81
viewsQ: Bug or Implementation error with ng-if in Ionic?
I created a list where I need to show whether an item has already been read or not, so I check a variable with the ng-if directive. But when the item is opened, and then returns/browses back to the…
-
0
votes2
answers1658
viewsQ: How to create App routes using Ionic and Angulas.js?
EDITED I was able to create routes with an example from the site itself. But I noticed that the controllers are in the same main file app.js and the views stay in the archive index.html. I wonder if…
-
1
votes1
answer143
viewsQ: Is it possible to run a Switch when the App is not running?
The App would have to communicate to the user, that there was change of a value in the server, but without use of Push Notification. So I thought I’d add a Logger to iOS, and that by detecting the…
-
1
votes1
answer158
viewsQ: How to perform file configuration for many Targets?
How can I configure Xcode to perform the following task: Use 1 Target as a template for other targets, and that some file/class when included or changed in this template can be referenced in other…
-
3
votes1
answer70
viewsQ: Do Swift apps work on an iPhone 4 with iOS 7?
Setting: An iPhone 4 operating with iOS 7 can run app’s developed with Swift? NOTE: I’m not referring to 4S, only 4.
-
0
votes1
answer57
viewsQ: How to create email in Swift using Mfmailcomposercontroller correctly?
I’m having trouble creating an email with MFMailComposerController on Swift. When trying to assign self to emailController.mailComposerController I get an error stating that I cannot assign…
-
0
votes1
answer54
viewsA: How to correctly adjust the image height in a Uitabbaritem?
I did some tests and noticed that it was a configuration problem. The correct value to be sent to the method must be equal: WRONG: self.navigationController.tabBarItem.imageInsets =…
-
1
votes1
answer54
viewsQ: How to correctly adjust the image height in a Uitabbaritem?
I set up two images for one tabBarItem. As I couldn’t find a way to change the center of the image, I used the following method to make the image effect go up a few pixels, above the UITabBar:…
-
0
votes3
answers312
viewsA: How to Configure Tab Bar Controller?
The two answers are great! And they helped. But there are some observations that I find interesting to make. The @Douglasferreira solution, make a new instance of objects already created by…
-
1
votes3
answers312
viewsQ: How to Configure Tab Bar Controller?
I have a Tab Bar Controller with 5 Viewcontrollers connected to it. With this, 5 buttons are displayed on the bar. I would like the Viewcontroller connected to the third button (middle button) to be…
-
22
votes2
answers4822
viewsQ: What would be the best practices for commits in Git?
There are best practices to perform commits and write comments on these commits, for better communication and understanding during the software development process?
-
1
votes1
answer612
viewsQ: How to add 1 kilometer to a Google Maps coordinate?
How could you add 1 km (or 1,000 m) to a google maps coordinate to determine an area? Example: Radius formed by points A and B: Point A = Latitude:-22.91009, Longetude: -43.107499. Point B =…
-
2
votes3
answers1854
viewsQ: How to return points within lightning?
I am developing an app where I would need to return points (Lat, Long) in a radius of size X (Km) from the user’s location (Lat, Long). I’ve devised the following logic: Get current user location…
-
0
votes1
answer35
viewsQ: How to Rotate Viewcontroller Manually?
I started a project, where I use a Custonnavigationcontroller to control the navigation of the screens. In this project, only one viewcontroller can be rotated to Landscape mode. But the following…
-
4
votes1
answer352
viewsQ: How to access PHP webservice securely from an Objective-C/iOS app?
I’m making an application where I need to securely send user data to the Web Service using PHP. For this, I’m researching security for iOS. What is the recommended method and what are the points I…
-
0
votes1
answer109
viewsA: Is there a back-end service that responds to SMS messages?
As commented by @Bacco: Let’s see if anyone knows any companies with a good API for this, but if nothing comes up and you want to venture, there are some things on the SMS website:…
-
0
votes1
answer72
viewsA: How to use an Nsstring to create an Nspredicate?
I made the mistake of including the PROPERTY next to YES. In fact one should put the argument that will be compared between quotation marks, getting the code like this: NSMutableString* escolhasSIM…
-
0
votes1
answer72
viewsQ: How to use an Nsstring to create an Nspredicate?
I am creating a custom search, but I am creating the strings of the predicate as a Nsstring. However I am getting an error. Code used: NSMutableString* escolhasSIM = [[NSMutableString alloc]init];…
-
2
votes1
answer101
viewsQ: How to add an object at a random position of a Nsmutablearray?
I am creating an array with the following capacity 15 this way: meuArray = [[NSMutableArray alloc] initWithCapacity:15]; But when I try to insert an object initially at position 10 in this way:…
objective-casked Tiago Amaral 1,520 -
2
votes1
answer109
viewsQ: Is there a back-end service that responds to SMS messages?
I’m doing research on back-end communication operations that use SMS messages to interact with users. I couldn’t find anything relevant on Google that explains clearly how this service works. Would…
-
3
votes2
answers437
viewsA: Closing Previous Activity makes the app faster?
Making an app more optimized requires several preparations in addition to closing previous activitys. Logically, when closing a previous Activity, it frees up memory and can help with processing.…
-
0
votes1
answer44
viewsQ: How to Choose position to print a string in a text?
I’m developing an app where the user can choose in the middle of a text, the position where the output value of a string should be printed. Example: Normally when we print a string in the middle of…
-
0
votes1
answer31
viewsA: How to add new property to the Gmsmarker class?
I managed to resolve by declaring a new class, inheriting Gmsmarker. In the declaration of the new class I included the new desired property, and then synthesized it. MeuMarker.h #import…
-
0
votes1
answer31
viewsQ: How to add new property to the Gmsmarker class?
Adding a new property to this class. I added it to the Gmsmarker. h file, but while trying to use the new property I received this error: -[Gmsmarker setIdRegister:]: unrecognized selector sent to…
-
1
votes1
answer49
viewsQ: How to configure Nspredicate to perform filter?
I am implementing a filter, where I need to search the records in Core Data, that have "yes" in certain columns. Table: For example, return the elements that have yes in the columns ATRIBUTO1,…
-
6
votes2
answers2437
viewsQ: How to properly save an image URL in Mysql database?
I am testing the targeting of images with the URL. However, during the tests, the URL was returned with changes as can be seen below: URL inserted in the database:…
-
1
votes1
answer104
viewsA: How to parse a Json with 2 columns in Objective-C?
After a few tests, I noticed that Xcode recognizes the second array as a dictionary, so I sent the message ...valueForKey:@"idRegitro"]; and he returned me the value correctly. But I was amazed,…
-
1
votes1
answer60
viewsA: Problems inserting new registration to Core Data
I discovered the mistake, there was a if within the body of the method that decided if it was increment and decrease of record. The Problem, first block of the if modified some variables that made…
-
1
votes1
answer521
viewsA: How to maintain a real-time sync?
After some research on the internet, and thanks to my friend @Qmechanic73, I found that this is a widely used tool in NOSQL database. Which are storage systems that do not use SQL (or relationship…
-
0
votes1
answer104
viewsQ: How to parse a Json with 2 columns in Objective-C?
In a Get using PHP I am making the request of 2 columns this way: <?php include 'conexao.php'; header('Content-Type: text/html; charset=UTF-8'); //Converte para UTF8 os resultados da query…
-
2
votes1
answer374
viewsQ: How to group Markers in Google Maps iOS API?
How can I group the markers of an area when the user zooms the map, to reduce the visual pollution of Marker’s on the map and show only one Marker, with a number inside to indicate the amount of…
-
5
votes4
answers4908
viewsQ: What is the cost of using the Google Maps API to create routes?
I’m creating an app where I take the user’s current position and create a route to a certain point. A friend commented that this route service offered by Google is paid for. Someone could or would…
-
0
votes1
answer49
viewsQ: How to pass map data to be displayed by another class?
I’m using Google’s Maps API for iOS. I was doing some testing and I set up a UIView as a subclass of GMSMapView and kept a pointer for her in ViewController, getting: #import <UIKit/UIKit.h>…
-
0
votes1
answer60
viewsQ: Problems inserting new registration to Core Data
I noticed a problem with the code, when I try to insert a new record in an entity, I lose all the old records and only the new one is saved. Code used: NSManagedObjectContext * context = [self…
-
2
votes1
answer521
viewsQ: How to maintain a real-time sync?
I’m working on an app, and I’ve got the database processed. But a question arose of how I can create a real-time synchronization system of the app’s local database with the remote server database.…
-
0
votes1
answer127
viewsQ: How to check empty records in Core Data?
I’m working on a way to see if the data has been downloaded and logged correctly into Core Data. Due to the poor quality of 3G connections and the possibility of failure, I would like to know if…
-
0
votes1
answer54
viewsA: Problems starting Uiimage with image path from core data
As recommended by friend Paulo Rodrigo, the path of the folders can be changed as updates in the App. It may not be found. So I made changes only to store the image name in Core Data, and to recover…
-
0
votes1
answer54
viewsQ: Problems starting Uiimage with image path from core data
I downloaded an image and stored it on disk. After downloading the class inserts the image path into the core data, this string:…
-
1
votes1
answer60
viewsA: Problem receiving the return of an object
I managed to solve!! The problem was at the time that I was performing the return of the data to the variable result. I was doing this before getData performed the data request. Then I created a…
-
0
votes2
answers106
viewsA: Download data in String format and JPG images
I bypassed this impasse by downloading asynchronous images and independent of the Strings download. But consecutive to the end of the download of Strings. After downloading all the objects, a…