Thanks a lot for your reply, actually my main question was about that, I was trying to do it by actual capabilities but the real deal is by the OS of course, the only remaining question is about the OS future, I mean is it something apple is looking forward to do? Because if they could do a built in feature that allow user in the setting pane to configure some event/gesture like swipe, touch, double tap, incoming notification with filter, ceduled, connect to wifi/bluetooth...etc to action like open an app (ask for passcode if protected), send webhook to end point, flip a switch (plane mode, wifi, etc) an so on... maybe with multiple profile that can be set like when connect to car bluetooth then enable the car profile, to be able to enable hand free or so feature... it would be the end of jailbreak because people who do this want those feature and other tweaks are secondary... I think a lot of users are just waiting for it from apple. (in reference, those tweaks are: activator and bannersound, a lot of addon have been made but the ideas is there)
I know that some feature are not possible but 90% could be done without any problem. From my side, I use smart home hub and a lot of data comes from the phone because the phone is always with the user and the app is installed there... and sometimes the phone could do the link where the hub could not and it would allows to makes the devices real smart, usefull and costumized.
Thanks for reply again and I hope the idea to make its way! :)
Post
Replies
Boosts
Views
Activity
I was not able to add comments...so I add my comment here... May I ask why? I know that its not a thing to allow an app from appstore to access other app content, but if it were part of firmware it would allow user to filter notifications without any risk because the firmware would dict the rules and its the user who would filter his notifications and the notifications are adressed to the user... Is it something possible from this point of view and if not why? Its always interesting to know about those things... Thanks!
May I ask why? I know that its not a thing to allow an app from appstore to access other app content, but if it were part of firmware it would allow user to filter notifications without any risk because the firmware would dict the rules and its the user who would filter his notifications and the notifications are adressed to the user... Is it something possible from this point of view and if not why? Its always interesting to know about those things... Thanks!
Ok... can I ask why? And could it be something that apple could add to the firmware? I could understand that they dont want an app to be able to modify other app notification even if it would be possible to just allow to filter... but if they add it to the firmware they can limit it to filter without having to worry about the appstore...
here is how I get and save the adress
its : get text from actual location, then save text as adress.txt file
or get document adress.txt , then get text from document...
same for saving
here is how I get and save the adress...
I just save the current location into a file. Then, lets say each hours, I run the shortcut with an automation...it load the adress saved in the file and compare it to actual location...then if the distance between those 2 adress is greater than 5 km it perform different action...and save again the adress...
In short, if I move 5km or more... it update the position inside different instance that I use to automate my phone, notifications, smart home things...etc...
that one is to check for meteo and update linked instances...
Thanks!
here the link, check where I get the adress.txt file and where I save adress.txt file...
https://www.icloud.com/shortcuts/5548bb2330f04ab4823c5439e9f685cf
Hi,
Thanks for the reply! I think I should explain the problem again, I just cant find any awnser anywhere! :)
I have a UITableView with UITextField in each cells. The cells are not the same height, I have a small one dedicated to the name and a large one dedicated to the phone number... So, small-large small-large small-large and so on...
I wish that if I select the small one to enter a name, the scroll action will unhide both small and large cell from the keyboard to be able to directly select the large one to enter the number...
If I select the large one, I want the scroll to only unhide this large cell from keyboard (the small one is before so visible).
The way I use is to store a value corresponding to the height of the large cell if I select a small one and 0 if I select a large one.
This value is updated fine, the only issue is that the delegate seems to keep only the first value active, so if the value changed, it wont scroll with this new value but with the old one...
So, if I hit return to dissmiss keyboard and select another textfield, everything is fine!
If I tap anywhere on the screen to dismiss keybord and then select a textfield, its fine too!
But if I select directly another textfield without escaping the active one to dissmiss the keyboard, it keeps the old value and not scroll correctly (exept if I select the same textfield size obviously).
IBAction , single tap etc are ok, all works exept for the part I described! When I select another textfield directly, the old one is deactivated and the new one activated correctly...
Here the code for the keyboard scroll:
(void)keyboardWasShown: (NSNotification*)aNotification
{
[UIView animateWithDuration:.3
animations:^(void)
{
NSDictionary* info = [aNotification userInfo];
CGSize kbSize = [[info objectForKey:UIKeyboardFrameBeginUserInfoKey]CGRectValue].size;
self.kbheight = kbSize.height;
UIEdgeInsets contentInsets = UIEdgeInsetsMake(0.0,0.0,(kbSize.height+self.cheatheight),0.0);
self.table.contentInset = contentInsets;
self.table.scrollIndicatorInsets = contentInsets;
}];
}
In the keyboardDidHide I just reset. It s like the keyboard dont dissmiss when I go from one textField to another directly, even if the field get deactivated...
Thanks!
Everything is fine now, that was because I was rebuilting the table on didendediting... But I still have a problem ! I scroll the view when keyboard appear to not hiding the field... But sometimes I need to scroll a little more on certain fields.. So in the shouldBeginEditing, I set a cheat with the height of the field and add this cheat to keyboard height , the cheat is 0 if not applyable... It works fine but only one time! The cheat value stay the same, its like the method is only called once. I need to dissmiss keyboard and edit new textfield ... if I change textfield during editing it ll keep the old value... Any clue on that one? Thanks!
Here what I have:[cell addSubview:tf];
tf.delegate = self;
[tf addTarget:self action:@selector(textFieldDidEndEditing:)forControlEvents:UIControlEventEditingChanged];
[tf addTarget:self action:@selector(textFieldFinished:) forControlEvents:UIControlEventEditingDidEndOnExit];If not how should I implement it? Thanks
I notice that if I make the screen rotate, the cursor gone and keyboard come to hide the field but I can write text... I will lock the portrait orientation but I still not understand why switching from textField is so messy! Thanks!
Sorry about it!I updated my awnser!tf is the textfield..
Here what I have: - (IBAction)textFieldFinished:(id)sender { [sender resignFirstResponder]; }
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
[self.view endEditing:YES]; }
- (void)textFieldDidEndEditing:(UITextField *)textField { //save value to userdefaults
}All those method works fine! Its only when selecting another textfield directly that I have no cursor and keyboard canhide the field but I can enter some text and it saved correctly to userdefaults... The code to create the field is complexeand depend on other method... but working fine! Here the main line that I think is the interesting one! - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [self.table dequeueReusableCellWithIdentifier:cellIdentifier];
NSMutableDictionary* prefs = [NSMutableDictionary dictionaryWithDictionary:
[[NSUserDefaults standardUserDefaults]persistentDomainForName:@"com.patpower.smscontrolprefs"]];
NSString *value =@"";
if(cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
[cell addSubview:tf];
tf.delegate = self;
[tf addTarget:self
action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];Thanks again !
Hi!thanks for reply!Its uitextField inside each cell of the uitableview. When I edit and tap return or tap anywhere (I use single tap gesture to dissmiss keyboard) everything is fine ( the scroll work to prevent keyboard from hiding the textfield and the cursor is there).But if I edit a textField and select another one to edit it without escaping the actual one , the keyboard hide and show but hide the textfield and there is no cursor , but I can enter text! I tried to force resign, even to wait few second in background and then use becomeFirstResponder to activate the textField but I must exit by taping return key or tap somewhere to exit the field and then select the other field...I hope it s better explained! My Textfield and tableview are created programmatically and are declared as delegate... this problem is the only one so far.. each code works fine... I even try to call the method that rebuilt the table before to set focus on the textfield but still no cursor and keyboard still hide it..It s like it always keep a link with the first edited textfield or half activated or something...thanks for your help its appreciated!